-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse 128 bit trace Id retuned by lambda extension #7620
base: master
Are you sure you want to change the base?
Parse 128 bit trace Id retuned by lambda extension #7620
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 3 performance improvements and 3 performance regressions! Performance is the same for 43 metrics, 14 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.40.0-SNAPSHOT~a78f9a0394, baseline=1.40.0-SNAPSHOT~f6810002f7
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1065878
Total [baseline] (10.409 s) : 0, 10408652
Agent [candidate] (1.071 s) : 0, 1070648
Total [candidate] (10.452 s) : 0, 10451912
section appsec
Agent [baseline] (1.212 s) : 0, 1211862
Total [baseline] (10.693 s) : 0, 10692975
Agent [candidate] (1.199 s) : 0, 1198796
Total [candidate] (10.699 s) : 0, 10698949
section iast
Agent [baseline] (1.2 s) : 0, 1199506
Total [baseline] (10.9 s) : 0, 10899545
Agent [candidate] (1.192 s) : 0, 1191982
Total [candidate] (10.983 s) : 0, 10982556
section profiling
Agent [baseline] (1.274 s) : 0, 1274194
Total [baseline] (10.637 s) : 0, 10637294
Agent [candidate] (1.263 s) : 0, 1263314
Total [candidate] (10.634 s) : 0, 10633539
gantt
title petclinic - break down per module: candidate=1.40.0-SNAPSHOT~a78f9a0394, baseline=1.40.0-SNAPSHOT~f6810002f7
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (679.114 ms) : 0, 679114
BytebuddyAgent [candidate] (684.43 ms) : 0, 684430
GlobalTracer [baseline] (310.854 ms) : 0, 310854
GlobalTracer [candidate] (311.969 ms) : 0, 311969
AppSec [baseline] (53.861 ms) : 0, 53861
AppSec [candidate] (52.05 ms) : 0, 52050
Remote Config [baseline] (664.71 µs) : 0, 665
Remote Config [candidate] (742.959 µs) : 0, 743
Telemetry [baseline] (7.658 ms) : 0, 7658
Telemetry [candidate] (7.625 ms) : 0, 7625
section appsec
BytebuddyAgent [baseline] (707.239 ms) : 0, 707239
BytebuddyAgent [candidate] (700.116 ms) : 0, 700116
GlobalTracer [baseline] (306.16 ms) : 0, 306160
GlobalTracer [candidate] (304.719 ms) : 0, 304719
AppSec [baseline] (164.482 ms) : 0, 164482
AppSec [candidate] (160.917 ms) : 0, 160917
Remote Config [baseline] (647.358 µs) : 0, 647
Remote Config [candidate] (649.762 µs) : 0, 650
Telemetry [baseline] (8.516 ms) : 0, 8516
Telemetry [candidate] (9.045 ms) : 0, 9045
IAST [baseline] (22.084 ms) : 0, 22084
IAST [candidate] (19.251 ms) : 0, 19251
section iast
BytebuddyAgent [baseline] (796.1 ms) : 0, 796100
BytebuddyAgent [candidate] (791.907 ms) : 0, 791907
GlobalTracer [baseline] (302.532 ms) : 0, 302532
GlobalTracer [candidate] (301.019 ms) : 0, 301019
AppSec [baseline] (53.489 ms) : 0, 53489
AppSec [candidate] (53.479 ms) : 0, 53479
Remote Config [baseline] (653.921 µs) : 0, 654
Remote Config [candidate] (618.257 µs) : 0, 618
Telemetry [baseline] (7.416 ms) : 0, 7416
Telemetry [candidate] (7.385 ms) : 0, 7385
IAST [baseline] (25.499 ms) : 0, 25499
IAST [candidate] (23.813 ms) : 0, 23813
section profiling
BytebuddyAgent [baseline] (677.939 ms) : 0, 677939
BytebuddyAgent [candidate] (673.255 ms) : 0, 673255
GlobalTracer [baseline] (397.879 ms) : 0, 397879
GlobalTracer [candidate] (394.46 ms) : 0, 394460
AppSec [baseline] (54.824 ms) : 0, 54824
AppSec [candidate] (52.346 ms) : 0, 52346
Remote Config [baseline] (660.719 µs) : 0, 661
Remote Config [candidate] (705.944 µs) : 0, 706
Telemetry [baseline] (7.516 ms) : 0, 7516
Telemetry [candidate] (7.463 ms) : 0, 7463
ProfilingAgent [baseline] (96.887 ms) : 0, 96887
ProfilingAgent [candidate] (96.972 ms) : 0, 96972
Profiling [baseline] (96.911 ms) : 0, 96911
Profiling [candidate] (96.996 ms) : 0, 96996
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.40.0-SNAPSHOT~a78f9a0394, baseline=1.40.0-SNAPSHOT~f6810002f7
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1066112
Total [baseline] (8.548 s) : 0, 8548071
Agent [candidate] (1.066 s) : 0, 1066367
Total [candidate] (8.568 s) : 0, 8567797
section iast
Agent [baseline] (1.203 s) : 0, 1202577
Total [baseline] (9.077 s) : 0, 9077233
Agent [candidate] (1.199 s) : 0, 1198634
Total [candidate] (9.073 s) : 0, 9073174
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.203 s) : 0, 1203203
Total [baseline] (9.014 s) : 0, 9013841
Agent [candidate] (1.197 s) : 0, 1197160
Total [candidate] (9.009 s) : 0, 9008647
section iast_TELEMETRY_OFF
Agent [baseline] (1.19 s) : 0, 1190124
Total [baseline] (9.02 s) : 0, 9020257
Agent [candidate] (1.199 s) : 0, 1199140
Total [candidate] (9.043 s) : 0, 9042506
gantt
title insecure-bank - break down per module: candidate=1.40.0-SNAPSHOT~a78f9a0394, baseline=1.40.0-SNAPSHOT~f6810002f7
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (679.492 ms) : 0, 679492
BytebuddyAgent [candidate] (680.47 ms) : 0, 680470
GlobalTracer [baseline] (310.982 ms) : 0, 310982
GlobalTracer [candidate] (312.152 ms) : 0, 312152
AppSec [baseline] (53.656 ms) : 0, 53656
AppSec [candidate] (51.757 ms) : 0, 51757
Remote Config [baseline] (663.064 µs) : 0, 663
Remote Config [candidate] (713.519 µs) : 0, 714
Telemetry [baseline] (7.587 ms) : 0, 7587
Telemetry [candidate] (7.543 ms) : 0, 7543
section iast
BytebuddyAgent [baseline] (799.527 ms) : 0, 799527
BytebuddyAgent [candidate] (797.78 ms) : 0, 797780
GlobalTracer [baseline] (301.862 ms) : 0, 301862
GlobalTracer [candidate] (301.713 ms) : 0, 301713
AppSec [baseline] (55.429 ms) : 0, 55429
AppSec [candidate] (54.14 ms) : 0, 54140
Remote Config [baseline] (642.011 µs) : 0, 642
Remote Config [candidate] (675.343 µs) : 0, 675
Telemetry [baseline] (7.468 ms) : 0, 7468
Telemetry [candidate] (7.49 ms) : 0, 7490
IAST [baseline] (23.773 ms) : 0, 23773
IAST [candidate] (22.978 ms) : 0, 22978
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (800.005 ms) : 0, 800005
BytebuddyAgent [candidate] (795.895 ms) : 0, 795895
GlobalTracer [baseline] (302.214 ms) : 0, 302214
GlobalTracer [candidate] (302.087 ms) : 0, 302087
AppSec [baseline] (54.195 ms) : 0, 54195
AppSec [candidate] (53.824 ms) : 0, 53824
Remote Config [baseline] (611.324 µs) : 0, 611
Remote Config [candidate] (611.39 µs) : 0, 611
Telemetry [baseline] (7.482 ms) : 0, 7482
Telemetry [candidate] (8.96 ms) : 0, 8960
IAST [baseline] (24.794 ms) : 0, 24794
IAST [candidate] (21.929 ms) : 0, 21929
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (789.225 ms) : 0, 789225
BytebuddyAgent [candidate] (796.601 ms) : 0, 796601
GlobalTracer [baseline] (300.62 ms) : 0, 300620
GlobalTracer [candidate] (302.877 ms) : 0, 302877
AppSec [baseline] (56.828 ms) : 0, 56828
AppSec [candidate] (52.385 ms) : 0, 52385
Remote Config [baseline] (623.565 µs) : 0, 624
Remote Config [candidate] (613.78 µs) : 0, 614
Telemetry [baseline] (7.325 ms) : 0, 7325
Telemetry [candidate] (7.347 ms) : 0, 7347
IAST [baseline] (21.722 ms) : 0, 21722
IAST [candidate] (25.403 ms) : 0, 25403
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~a78f9a0394, baseline=1.40.0-SNAPSHOT~f6810002f7
dateFormat X
axisFormat %s
section baseline
no_agent (1.323 ms) : 1304, 1342
. : milestone, 1323,
appsec (1.721 ms) : 1696, 1746
. : milestone, 1721,
appsec_no_iast (1.717 ms) : 1692, 1742
. : milestone, 1717,
iast (1.481 ms) : 1459, 1504
. : milestone, 1481,
profiling (1.479 ms) : 1456, 1502
. : milestone, 1479,
tracing (1.473 ms) : 1449, 1496
. : milestone, 1473,
section candidate
no_agent (1.352 ms) : 1332, 1372
. : milestone, 1352,
appsec (1.736 ms) : 1712, 1760
. : milestone, 1736,
appsec_no_iast (1.721 ms) : 1696, 1745
. : milestone, 1721,
iast (1.49 ms) : 1467, 1513
. : milestone, 1490,
profiling (1.478 ms) : 1455, 1501
. : milestone, 1478,
tracing (1.471 ms) : 1446, 1495
. : milestone, 1471,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~a78f9a0394, baseline=1.40.0-SNAPSHOT~f6810002f7
dateFormat X
axisFormat %s
section baseline
no_agent (370.891 µs) : 351, 391
. : milestone, 371,
iast (481.577 µs) : 460, 503
. : milestone, 482,
iast_FULL (551.598 µs) : 530, 573
. : milestone, 552,
iast_GLOBAL (508.434 µs) : 487, 530
. : milestone, 508,
iast_HARDCODED_SECRET_DISABLED (496.17 µs) : 475, 518
. : milestone, 496,
iast_INACTIVE (446.725 µs) : 426, 468
. : milestone, 447,
iast_TELEMETRY_OFF (479.94 µs) : 457, 503
. : milestone, 480,
tracing (440.613 µs) : 420, 461
. : milestone, 441,
section candidate
no_agent (373.368 µs) : 353, 394
. : milestone, 373,
iast (487.98 µs) : 466, 510
. : milestone, 488,
iast_FULL (554.01 µs) : 533, 575
. : milestone, 554,
iast_GLOBAL (507.321 µs) : 484, 530
. : milestone, 507,
iast_HARDCODED_SECRET_DISABLED (488.873 µs) : 467, 511
. : milestone, 489,
iast_INACTIVE (447.237 µs) : 426, 468
. : milestone, 447,
iast_TELEMETRY_OFF (473.958 µs) : 452, 496
. : milestone, 474,
tracing (444.163 µs) : 424, 465
. : milestone, 444,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~a78f9a0394, baseline=1.40.0-SNAPSHOT~f6810002f7
dateFormat X
axisFormat %s
section baseline
no_agent (15.096 s) : 15096000, 15096000
. : milestone, 15096000,
appsec (15.307 s) : 15307000, 15307000
. : milestone, 15307000,
iast (19.001 s) : 19001000, 19001000
. : milestone, 19001000,
iast_GLOBAL (18.129 s) : 18129000, 18129000
. : milestone, 18129000,
profiling (15.329 s) : 15329000, 15329000
. : milestone, 15329000,
tracing (15.224 s) : 15224000, 15224000
. : milestone, 15224000,
section candidate
no_agent (15.281 s) : 15281000, 15281000
. : milestone, 15281000,
appsec (14.976 s) : 14976000, 14976000
. : milestone, 14976000,
iast (18.742 s) : 18742000, 18742000
. : milestone, 18742000,
iast_GLOBAL (17.906 s) : 17906000, 17906000
. : milestone, 17906000,
profiling (15.221 s) : 15221000, 15221000
. : milestone, 15221000,
tracing (15.276 s) : 15276000, 15276000
. : milestone, 15276000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~a78f9a0394, baseline=1.40.0-SNAPSHOT~f6810002f7
dateFormat X
axisFormat %s
section baseline
no_agent (1.467 ms) : 1455, 1478
. : milestone, 1467,
appsec (2.309 ms) : 2269, 2350
. : milestone, 2309,
iast (2.058 ms) : 2007, 2110
. : milestone, 2058,
iast_GLOBAL (2.097 ms) : 2046, 2148
. : milestone, 2097,
profiling (2.405 ms) : 2218, 2593
. : milestone, 2405,
tracing (1.884 ms) : 1846, 1922
. : milestone, 1884,
section candidate
no_agent (1.459 ms) : 1448, 1471
. : milestone, 1459,
appsec (2.277 ms) : 2237, 2317
. : milestone, 2277,
iast (2.041 ms) : 1992, 2090
. : milestone, 2041,
iast_GLOBAL (2.092 ms) : 2041, 2143
. : milestone, 2092,
profiling (1.916 ms) : 1876, 1956
. : milestone, 1916,
tracing (1.904 ms) : 1865, 1943
. : milestone, 1904,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the full context so I might ask a dumb question here (but I'm going to ask nonetheless 😇 ): why don't you use context propagation api with Datadog style here?
Hi @PerfectSlayer, I'm extending code that was written two years ago. Can you point me to an example of the context propagation API? |
Sure, if pass the Extracted context = tracer.propagate().extract(response.headers(), (carrier, classifier) -> {
for (String headerName : carrier.names()) {
classifier.accept(headerName, carrier.get(headerName));
}
});
Using the context propagation API will ensure you will get the same behavior as any other instrumentations, respect customer config and benefits from any future evolution. |
Thanks! I'll look into the failing checks and remove the old implementation of |
}); | ||
} | ||
} catch (Throwable ignored) { | ||
log.error("could not reach the extension"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it expected to show an error to the customer in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this means the user is starting a Java Lambda function instrumented with dd-trace-js, but it doesn't have the Lambda Extension, which means it can't send metrics etc. back to Datadog. It should leave an error in the logs so we can diagnose.
What's the right way to new up a CoreTracer in the Groovy tests? This seems to be giving me some problems. |
What Does This Do
I've updated the Lambda extension so it is capable of returning a 128 bit trace ID when a tracer calls the
/lambda/start-invocation
endpoint in this PRAs per the RFC, the
This change modifies the function that calls
/lambda/start-invocation
, allowing it to pick out the upper 64 bits of the trace ID and set the resulting 128-bit trace ID in the extracted context.I labelled this with
tag: no release notes
because it just changes behavior between the tracer and the Lambda extension.Motivation
Step Function traces create 128 bit trace IDs. Soon everything else will too.
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: SVLS-5583