-
Notifications
You must be signed in to change notification settings - Fork 306
Simplify context propagation #8719
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
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 16 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~30b0291160, baseline=1.50.0-SNAPSHOT~0903cf408b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1020933
Total [baseline] (10.446 s) : 0, 10446353
Agent [candidate] (1.018 s) : 0, 1018136
Total [candidate] (10.461 s) : 0, 10461041
section appsec
Agent [baseline] (1.164 s) : 0, 1163500
Total [baseline] (10.665 s) : 0, 10665048
Agent [candidate] (1.16 s) : 0, 1160343
Total [candidate] (10.695 s) : 0, 10695480
section iast
Agent [baseline] (1.151 s) : 0, 1150608
Total [baseline] (10.908 s) : 0, 10908148
Agent [candidate] (1.16 s) : 0, 1159663
Total [candidate] (10.926 s) : 0, 10925822
section profiling
Agent [baseline] (1.29 s) : 0, 1289542
Total [baseline] (10.944 s) : 0, 10944249
Agent [candidate] (1.278 s) : 0, 1277827
Total [candidate] (10.823 s) : 0, 10822741
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~30b0291160, baseline=1.50.0-SNAPSHOT~0903cf408b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (684.721 ms) : 0, 684721
BytebuddyAgent [candidate] (682.752 ms) : 0, 682752
GlobalTracer [baseline] (241.001 ms) : 0, 241001
GlobalTracer [candidate] (240.184 ms) : 0, 240184
AppSec [baseline] (54.58 ms) : 0, 54580
AppSec [candidate] (54.176 ms) : 0, 54176
Debugger [baseline] (6.977 ms) : 0, 6977
Debugger [candidate] (7.601 ms) : 0, 7601
Remote Config [baseline] (714.529 µs) : 0, 715
Remote Config [candidate] (708.079 µs) : 0, 708
Telemetry [baseline] (9.133 ms) : 0, 9133
Telemetry [candidate] (9.068 ms) : 0, 9068
section appsec
BytebuddyAgent [baseline] (702.03 ms) : 0, 702030
BytebuddyAgent [candidate] (699.998 ms) : 0, 699998
GlobalTracer [baseline] (237.077 ms) : 0, 237077
GlobalTracer [candidate] (236.571 ms) : 0, 236571
AppSec [baseline] (175.845 ms) : 0, 175845
AppSec [candidate] (175.062 ms) : 0, 175062
Debugger [baseline] (5.933 ms) : 0, 5933
Debugger [candidate] (5.958 ms) : 0, 5958
Remote Config [baseline] (626.461 µs) : 0, 626
Remote Config [candidate] (624.096 µs) : 0, 624
Telemetry [baseline] (7.41 ms) : 0, 7410
Telemetry [candidate] (7.777 ms) : 0, 7777
IAST [baseline] (21.853 ms) : 0, 21853
IAST [candidate] (21.542 ms) : 0, 21542
section iast
BytebuddyAgent [baseline] (803.697 ms) : 0, 803697
BytebuddyAgent [candidate] (809.813 ms) : 0, 809813
GlobalTracer [baseline] (230.546 ms) : 0, 230546
GlobalTracer [candidate] (232.421 ms) : 0, 232421
AppSec [baseline] (51.954 ms) : 0, 51954
AppSec [candidate] (52.369 ms) : 0, 52369
Debugger [baseline] (5.945 ms) : 0, 5945
Debugger [candidate] (5.86 ms) : 0, 5860
Remote Config [baseline] (593.724 µs) : 0, 594
Remote Config [candidate] (610.468 µs) : 0, 610
Telemetry [baseline] (7.809 ms) : 0, 7809
Telemetry [candidate] (7.859 ms) : 0, 7859
IAST [baseline] (25.784 ms) : 0, 25784
IAST [candidate] (26.918 ms) : 0, 26918
section profiling
BytebuddyAgent [baseline] (678.708 ms) : 0, 678708
BytebuddyAgent [candidate] (673.142 ms) : 0, 673142
GlobalTracer [baseline] (376.558 ms) : 0, 376558
GlobalTracer [candidate] (374.055 ms) : 0, 374055
AppSec [baseline] (62.646 ms) : 0, 62646
AppSec [candidate] (62.293 ms) : 0, 62293
Debugger [baseline] (6.409 ms) : 0, 6409
Debugger [candidate] (6.3 ms) : 0, 6300
Remote Config [baseline] (672.905 µs) : 0, 673
Remote Config [candidate] (675.403 µs) : 0, 675
Telemetry [baseline] (8.412 ms) : 0, 8412
Telemetry [candidate] (8.137 ms) : 0, 8137
ProfilingAgent [baseline] (104.962 ms) : 0, 104962
ProfilingAgent [candidate] (102.501 ms) : 0, 102501
Profiling [baseline] (104.987 ms) : 0, 104987
Profiling [candidate] (102.524 ms) : 0, 102524
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~30b0291160, baseline=1.50.0-SNAPSHOT~0903cf408b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.022 s) : 0, 1022273
Total [baseline] (8.661 s) : 0, 8660790
Agent [candidate] (1.022 s) : 0, 1022117
Total [candidate] (8.67 s) : 0, 8669918
section iast
Agent [baseline] (1.155 s) : 0, 1154521
Total [baseline] (9.204 s) : 0, 9203917
Agent [candidate] (1.15 s) : 0, 1150302
Total [candidate] (9.218 s) : 0, 9218049
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.157 s) : 0, 1156868
Total [baseline] (9.197 s) : 0, 9196506
Agent [candidate] (1.165 s) : 0, 1165016
Total [candidate] (9.237 s) : 0, 9237011
section iast_TELEMETRY_OFF
Agent [baseline] (1.145 s) : 0, 1145258
Total [baseline] (9.256 s) : 0, 9255951
Agent [candidate] (1.15 s) : 0, 1149746
Total [candidate] (9.254 s) : 0, 9254485
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~30b0291160, baseline=1.50.0-SNAPSHOT~0903cf408b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (683.981 ms) : 0, 683981
BytebuddyAgent [candidate] (682.385 ms) : 0, 682385
GlobalTracer [baseline] (240.549 ms) : 0, 240549
GlobalTracer [candidate] (239.702 ms) : 0, 239702
AppSec [baseline] (55.975 ms) : 0, 55975
AppSec [candidate] (55.338 ms) : 0, 55338
Debugger [baseline] (7.55 ms) : 0, 7550
Debugger [candidate] (8.331 ms) : 0, 8331
Remote Config [baseline] (706.451 µs) : 0, 706
Remote Config [candidate] (710.431 µs) : 0, 710
Telemetry [baseline] (9.848 ms) : 0, 9848
Telemetry [candidate] (12.046 ms) : 0, 12046
section iast
BytebuddyAgent [baseline] (806.643 ms) : 0, 806643
BytebuddyAgent [candidate] (802.536 ms) : 0, 802536
GlobalTracer [baseline] (231.112 ms) : 0, 231112
GlobalTracer [candidate] (230.841 ms) : 0, 230841
IAST [baseline] (28.483 ms) : 0, 28483
IAST [candidate] (27.581 ms) : 0, 27581
AppSec [baseline] (50.272 ms) : 0, 50272
AppSec [candidate] (51.367 ms) : 0, 51367
Debugger [baseline] (5.933 ms) : 0, 5933
Debugger [candidate] (5.921 ms) : 0, 5921
Remote Config [baseline] (613.742 µs) : 0, 614
Remote Config [candidate] (598.898 µs) : 0, 599
Telemetry [baseline] (7.906 ms) : 0, 7906
Telemetry [candidate] (7.924 ms) : 0, 7924
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (808.252 ms) : 0, 808252
BytebuddyAgent [candidate] (813.794 ms) : 0, 813794
GlobalTracer [baseline] (231.539 ms) : 0, 231539
GlobalTracer [candidate] (233.399 ms) : 0, 233399
IAST [baseline] (28.582 ms) : 0, 28582
IAST [candidate] (29.594 ms) : 0, 29594
AppSec [baseline] (50.436 ms) : 0, 50436
AppSec [candidate] (49.846 ms) : 0, 49846
Debugger [baseline] (5.884 ms) : 0, 5884
Debugger [candidate] (5.952 ms) : 0, 5952
Remote Config [baseline] (602.449 µs) : 0, 602
Remote Config [candidate] (606.282 µs) : 0, 606
Telemetry [baseline] (7.957 ms) : 0, 7957
Telemetry [candidate] (8.036 ms) : 0, 8036
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (799.203 ms) : 0, 799203
BytebuddyAgent [candidate] (800.607 ms) : 0, 800607
GlobalTracer [baseline] (230.577 ms) : 0, 230577
GlobalTracer [candidate] (232.283 ms) : 0, 232283
IAST [baseline] (22.987 ms) : 0, 22987
IAST [candidate] (23.378 ms) : 0, 23378
AppSec [baseline] (54.851 ms) : 0, 54851
AppSec [candidate] (54.648 ms) : 0, 54648
Debugger [baseline] (5.885 ms) : 0, 5885
Debugger [candidate] (5.982 ms) : 0, 5982
Remote Config [baseline] (592.171 µs) : 0, 592
Remote Config [candidate] (626.066 µs) : 0, 626
Telemetry [baseline] (7.685 ms) : 0, 7685
Telemetry [candidate] (7.794 ms) : 0, 7794
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~30b0291160, baseline=1.50.0-SNAPSHOT~0903cf408b
dateFormat X
axisFormat %s
section baseline
no_agent (1.356 ms) : 1336, 1375
. : milestone, 1356,
appsec (1.726 ms) : 1703, 1750
. : milestone, 1726,
appsec_no_iast (1.745 ms) : 1721, 1768
. : milestone, 1745,
code_origins (1.673 ms) : 1645, 1700
. : milestone, 1673,
iast (1.52 ms) : 1496, 1544
. : milestone, 1520,
profiling (1.574 ms) : 1549, 1599
. : milestone, 1574,
tracing (1.491 ms) : 1466, 1516
. : milestone, 1491,
section candidate
no_agent (1.361 ms) : 1341, 1380
. : milestone, 1361,
appsec (1.712 ms) : 1689, 1736
. : milestone, 1712,
appsec_no_iast (1.726 ms) : 1703, 1750
. : milestone, 1726,
code_origins (1.649 ms) : 1622, 1676
. : milestone, 1649,
iast (1.509 ms) : 1484, 1533
. : milestone, 1509,
profiling (1.534 ms) : 1509, 1559
. : milestone, 1534,
tracing (1.496 ms) : 1472, 1521
. : milestone, 1496,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~30b0291160, baseline=1.50.0-SNAPSHOT~0903cf408b
dateFormat X
axisFormat %s
section baseline
no_agent (385.976 µs) : 366, 406
. : milestone, 386,
iast (521.471 µs) : 499, 544
. : milestone, 521,
iast_FULL (731.506 µs) : 709, 754
. : milestone, 732,
iast_GLOBAL (571.172 µs) : 549, 593
. : milestone, 571,
iast_HARDCODED_SECRET_DISABLED (526.626 µs) : 503, 550
. : milestone, 527,
iast_INACTIVE (461.326 µs) : 439, 484
. : milestone, 461,
iast_TELEMETRY_OFF (506.399 µs) : 484, 529
. : milestone, 506,
tracing (466.703 µs) : 444, 489
. : milestone, 467,
section candidate
no_agent (382.459 µs) : 362, 403
. : milestone, 382,
iast (514.054 µs) : 492, 536
. : milestone, 514,
iast_FULL (736.171 µs) : 714, 758
. : milestone, 736,
iast_GLOBAL (557.15 µs) : 535, 579
. : milestone, 557,
iast_HARDCODED_SECRET_DISABLED (524.506 µs) : 502, 547
. : milestone, 525,
iast_INACTIVE (469.423 µs) : 447, 492
. : milestone, 469,
iast_TELEMETRY_OFF (515.865 µs) : 493, 539
. : milestone, 516,
tracing (460.479 µs) : 438, 483
. : milestone, 460,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~30b0291160, baseline=1.50.0-SNAPSHOT~0903cf408b
dateFormat X
axisFormat %s
section baseline
no_agent (15.267 s) : 15267000, 15267000
. : milestone, 15267000,
appsec (15.015 s) : 15015000, 15015000
. : milestone, 15015000,
iast (19.04 s) : 19040000, 19040000
. : milestone, 19040000,
iast_GLOBAL (18.144 s) : 18144000, 18144000
. : milestone, 18144000,
profiling (15.411 s) : 15411000, 15411000
. : milestone, 15411000,
tracing (15.099 s) : 15099000, 15099000
. : milestone, 15099000,
section candidate
no_agent (15.656 s) : 15656000, 15656000
. : milestone, 15656000,
appsec (14.677 s) : 14677000, 14677000
. : milestone, 14677000,
iast (18.934 s) : 18934000, 18934000
. : milestone, 18934000,
iast_GLOBAL (18.292 s) : 18292000, 18292000
. : milestone, 18292000,
profiling (15.63 s) : 15630000, 15630000
. : milestone, 15630000,
tracing (14.915 s) : 14915000, 14915000
. : milestone, 14915000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~30b0291160, baseline=1.50.0-SNAPSHOT~0903cf408b
dateFormat X
axisFormat %s
section baseline
no_agent (1.47 ms) : 1458, 1481
. : milestone, 1470,
appsec (2.409 ms) : 2359, 2458
. : milestone, 2409,
iast (2.196 ms) : 2134, 2258
. : milestone, 2196,
iast_GLOBAL (2.235 ms) : 2172, 2297
. : milestone, 2235,
profiling (2.07 ms) : 2019, 2121
. : milestone, 2070,
tracing (2.021 ms) : 1972, 2070
. : milestone, 2021,
section candidate
no_agent (1.479 ms) : 1467, 1490
. : milestone, 1479,
appsec (2.408 ms) : 2359, 2458
. : milestone, 2408,
iast (2.191 ms) : 2128, 2254
. : milestone, 2191,
iast_GLOBAL (2.237 ms) : 2174, 2300
. : milestone, 2237,
profiling (2.037 ms) : 1987, 2087
. : milestone, 2037,
tracing (2.021 ms) : 1972, 2069
. : milestone, 2021,
|
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.
Some feedback to match the RFC
links = new ArrayList<>(); | ||
parentContext = null; | ||
} else if (behaviorExtract == TracePropagationBehaviorExtract.RESTART) { | ||
links = new ArrayList<>(); |
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.
One feature in the RFC is that we don't want to include any span links that are created from terminated_context
during the extraction phase. The resetting of the links
ArrayList was to remove those, since there is a call to addTerminatedContextAsLinks()
in buildSpan, prior to the call to buildSpanContext()
. Maybe that call should be removed?
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.
That was only an early try to check how the CI would behave.
Yes, the call from buildSpan
went away, the main goal is to handle the terminated context / span link in a single location (buildSpanContext
) to avoid multiple allocation.
I keep trying thing in this PR, because I feel the isRemote()
behavior on DDSpanContext
is wrong compared to its interface behavior. It's only usage what for last parent id tag, which also need improvements / refactoring.
.build()) | ||
: SpanLink.from(parentContext); | ||
links.add(link); | ||
if (Config.get().getTracePropagationBehaviorExtract() == RESTART) { |
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.
if (Config.get().getTracePropagationBehaviorExtract() == RESTART) { | |
if (Config.get().getTracePropagationBehaviorExtract() == RESTART || Config.get().getTracePropagationBehaviorExtract() == IGNORE) { |
8aeb60d
to
cf070a5
Compare
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.
LGTM, one small question about something I don't understand.
if (propagationTags.getLastParentId() == null) { | ||
if (context.isRemote()) { | ||
CharSequence lastParentId = context.getLastParentId(); | ||
if (lastParentId != null) { | ||
propagationTags.updateLastParentId(lastParentId); | ||
} | ||
} else { | ||
propagationTags.updateLastParentId(DDSpanId.toHexStringPadded(context.getSpanId())); | ||
} | ||
} | ||
|
||
propagationTags.updateLastParentId(DDSpanId.toHexStringPadded(context.getSpanId())); |
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.
What is the reason for removing this here? It feels like to me that the end effect would be different since we are no longer checking for null before doing an update of the parentId?
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.
Yeah, and the previous behavior feels bogus to me.
We want the last parent id to be the current span id when injected, right?
The last parent id is stored in the root span (of the local pending trace).
So if at some point the last parent id is set, and later on another span of the same local trace we do injection, the last parent id will already be set (to some other span, not the current one) and it won’t be updated.
So with this change, I’m enforcing to always use the current span id as last parent id.
Should I write some test to check for the expected behavior? -- and test it again master and this PR
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 added some unit tests and @zacharycmontoya is writing some system tests here: DataDog/system-tests#4595
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.
FYI @PerfectSlayer the system-tests have been merged now with a Java skip
a84184b
to
b9ce87a
Compare
Datadog Summary✅ Code Quality ✅ Code Security ✅ Dependencies Was this helpful? Give us feedback! |
Avoid adding terminated contexts as span links and clearing them if not needed.
b9ce87a
to
30b0291
Compare
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.49.0` -> `1.50.0` | --- ### Release Notes <details> <summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary> ### [`v1.50.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.50.0): 1.50.0 ### Deprecation Notice > \[!NOTE] > `DD_RUNTIME_ID_ENABLED` has been deprecated and will be removed in future releases. Please use `DD_RUNTIME_METRICS_RUNTIME_ID_ENABLED` instead. ### Components #### Application Security Management (WAF) - 🐛 Add String length truncation limit to ObjectIntrospector and update truncation metrics ([#​8825](DataDog/dd-trace-java#8825) - [@​jandro996](https://github.com/jandro996)) - 🐛 Adapt standalone ASM to support API Security ([#​8804](DataDog/dd-trace-java#8804) - [@​jandro996](https://github.com/jandro996)) - ✨ Add appsec.waf.input\_truncated metric ([#​8791](DataDog/dd-trace-java#8791) - [@​jandro996](https://github.com/jandro996)) - ✨ Extended appsec request body collection ([#​8748](DataDog/dd-trace-java#8748) - [@​jandro996](https://github.com/jandro996)) - ✨ Extended appsec request/response headers collection ([#​8724](DataDog/dd-trace-java#8724) - [@​jandro996](https://github.com/jandro996)) #### Build & Tooling - ✨ Add artifacts to public s3 bucket ([#​8947](DataDog/dd-trace-java#8947) - [@​randomanderson](https://github.com/randomanderson)) #### Continuous Integration Visibility - ✨ Improve PR information building ([#​8908](DataDog/dd-trace-java#8908) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - ✨ Truncate span stack traces when Test Optimization is enabled ([#​8903](DataDog/dd-trace-java#8903) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Ensure auto-detected service name is the same for every process in the same build ([#​8902](DataDog/dd-trace-java#8902) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Use tag as fallback in api requests if no branch is available ([#​8876](DataDog/dd-trace-java#8876) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - ✨ Add support for JUnit 5.13-RC1 ([#​8865](DataDog/dd-trace-java#8865), [#​8871](DataDog/dd-trace-java#8871) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - ✨ Implement attempt to fix v3 and v4 and bump capability version ([#​8824](DataDog/dd-trace-java#8824) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - 🧹 Align retry logic for all test framework instrumentations ([#​8803](DataDog/dd-trace-java#8803) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - 🐛 Always build ci workspace without trailing separator ([#​8788](DataDog/dd-trace-java#8788) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - ✨ Add commit discrepancies telemetry when building repository git information ([#​8763](DataDog/dd-trace-java#8763) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) #### Data Streams Monitoring - 💡 Surface process tags in dsm payloads and use them for base hash calculation ([#​8836](DataDog/dd-trace-java#8836) - [@​amarziali](https://github.com/amarziali)) #### Dynamic Instrumentation - ✨ Optimized allocations for collection filter functions ([#​8896](DataDog/dd-trace-java#8896) - [@​jpbempel](https://github.com/jpbempel)) - 🐛 Fix SymDB upload size check ([#​8887](DataDog/dd-trace-java#8887) - [@​jpbempel](https://github.com/jpbempel)) - 🐛 Add support for Set in filter function ([#​8873](DataDog/dd-trace-java#8873) - [@​jpbempel](https://github.com/jpbempel)) - 🐛 Add support for isDefined in log template ([#​8859](DataDog/dd-trace-java#8859) - [@​jpbempel](https://github.com/jpbempel)) - 🐛 Fix Max captured frames for Exception Replay ([#​8856](DataDog/dd-trace-java#8856) - [@​jpbempel](https://github.com/jpbempel)) - 🐛 Remove static inherited fields collection ([#​8832](DataDog/dd-trace-java#8832) - [@​jpbempel](https://github.com/jpbempel)) - 💡 Add process tags to dynamic instrumentation intake payload ([#​8779](DataDog/dd-trace-java#8779) - [@​amarziali](https://github.com/amarziali)) #### GraalVM native-image - ✨ Add support for GraalVM Native GC metrics ([#​8913](DataDog/dd-trace-java#8913) - [@​ygree](https://github.com/ygree)) - ✨ Add JMXFetch support for GraalVM Native ([#​8569](DataDog/dd-trace-java#8569) - [@​ygree](https://github.com/ygree)) #### JMX fetch - ✨ Add support for GraalVM Native GC metrics ([#​8913](DataDog/dd-trace-java#8913) - [@​ygree](https://github.com/ygree)) #### Library Injection - ✨ Deny oracle db jvm based tools ([#​8909](DataDog/dd-trace-java#8909) - [@​bric3](https://github.com/bric3)) #### OpenTracing - 🐛 Fix OT packaging for exception replay ([#​8912](DataDog/dd-trace-java#8912) - [@​jpbempel](https://github.com/jpbempel)) #### Profiling - ✨ Bump ddprof to 1.27.0 ([#​8893](DataDog/dd-trace-java#8893) - [@​jbachorik](https://github.com/jbachorik)) - Properly handle the adaptive sampling interval overflow by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#213 - Fix [#​200](DataDog/dd-trace-java#200) Crash related to aligned\_alloc and free in context by [@​yanglong1010](https://github.com/yanglong1010) in DataDog/java-profiler#208 - Explicitly initialize empty context page by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#210 - Re-connect crash recursion protection with VM stackwalker by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#214 - ✨ Enable ZSTD compression for profiling ([#​8862](DataDog/dd-trace-java#8862) - [@​MattAlp](https://github.com/MattAlp)) - ✨ Extend JPS re-implementation to J9 family ([#​8813](DataDog/dd-trace-java#8813) - [@​MattAlp](https://github.com/MattAlp)) - 💡 Collect process tags for profiling upload requests ([#​8780](DataDog/dd-trace-java#8780) - [@​amarziali](https://github.com/amarziali)) #### Telemetry - 💡 Surface process tags on telemetry payloads ([#​8837](DataDog/dd-trace-java#8837) - [@​amarziali](https://github.com/amarziali)) #### Trace context propagation - ✨ Migrating all HttpClient Instrumentations to Inject Full Context ([#​8826](DataDog/dd-trace-java#8826) - [@​mhlidd](https://github.com/mhlidd)) - ✨ Migrating all HttpServer Instrumentations to Extract full Context ([#​8820](DataDog/dd-trace-java#8820) - [@​mhlidd](https://github.com/mhlidd)) - ✨ Add context API support OTel propagators ([#​8770](DataDog/dd-trace-java#8770) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) #### Tracer core - ✨⚡ Skip JAXB generated classes classloader ([#​9003](DataDog/dd-trace-java#9003) - [@​bric3](https://github.com/bric3)) - ✨ Add DD\_RUNTIME\_METRICS\_RUNTIME\_ID\_ENABLED alias for runtime id generation ([#​8981](DataDog/dd-trace-java#8981) - [@​amarziali](https://github.com/amarziali)) - 🐛 Use resolved address for peer.hostname when available without hitting the cache ([#​8915](DataDog/dd-trace-java#8915) - [@​amarziali](https://github.com/amarziali)) - 💡 Surface server name process tag for tomcat ([#​8894](DataDog/dd-trace-java#8894) - [@​amarziali](https://github.com/amarziali)) - 💡 Surface websphere cell and server name on process tags ([#​8880](DataDog/dd-trace-java#8880) - [@​amarziali](https://github.com/amarziali)) - ✨ Added special lightweight pre-main class that skips installation on incompatible JVMs. ([#​8855](DataDog/dd-trace-java#8855) - [@​AlexeyKuznetsov-DD](https://github.com/AlexeyKuznetsov-DD)) - 💡 Add entrypoint type to process tags ([#​8839](DataDog/dd-trace-java#8839) - [@​amarziali](https://github.com/amarziali)) - ✨ Extend JPS re-implementation to J9 family ([#​8813](DataDog/dd-trace-java#8813) - [@​MattAlp](https://github.com/MattAlp)) - ✨ Notify listeners when the scope top changes after switching scope stacks ([#​8797](DataDog/dd-trace-java#8797) - [@​mcculls](https://github.com/mcculls)) - ✨ Read hsperfdata for Java PIDs if jvmstat is unavailable ([#​8792](DataDog/dd-trace-java#8792) - [@​MattAlp](https://github.com/MattAlp)) - 🐛 Turn JDK socket support on by default ([#​8752](DataDog/dd-trace-java#8752) - [@​sarahchen6](https://github.com/sarahchen6)) - ✨ Simplify context propagation ([#​8719](DataDog/dd-trace-java#8719) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨ Add JSON parsing support ([#​8579](DataDog/dd-trace-java#8579) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) #### Tracer internal logging - ✨ Fix printing format of span identifiers ([#​8897](DataDog/dd-trace-java#8897) - [@​vandonr](https://github.com/vandonr)) #### Tracer public API - 💡 Track the source of installation ([#​8956](DataDog/dd-trace-java#8956) - [@​mabdinur](https://github.com/mabdinur)) - ✨ Enforce size limit on application\_monitoring.yaml files ([#​8789](DataDog/dd-trace-java#8789) - [@​mtoffl01](https://github.com/mtoffl01)) - ✨ Enabling baggage cache to support limits and non-ascii characters ([#​8713](DataDog/dd-trace-java#8713) - [@​mhlidd](https://github.com/mhlidd)) ### Instrumentations #### AWS Lambda instrumentation - ✨ Pass Lambda Request ID to Extension ([#​8814](DataDog/dd-trace-java#8814) - [@​nhulston](https://github.com/nhulston)) #### Core Java language instrumentation - ✨ Ensure ClassloadingInstrumentation is always applied even with `DD_TRACE_ENABLED=false` ([#​8863](DataDog/dd-trace-java#8863) - [@​mcculls](https://github.com/mcculls)) #### Eclipse Vert.x instrumentation - 🐛 Do not override route with / in vertx instrumentation ([#​8881](DataDog/dd-trace-java#8881) - [@​vandonr](https://github.com/vandonr)) #### IBM Liberty - 🐛 Fix error mark on http status for IBM liberty ([#​8822](DataDog/dd-trace-java#8822) - [@​amarziali](https://github.com/amarziali)) #### JDBC instrumentation - 🐛 Do not prepend DBM <> APM trace comment in SQLCommenter if there is a pg plan hint ([#​8864](DataDog/dd-trace-java#8864) - [@​edengorevoy](https://github.com/edengorevoy)) #### JMS instrumentation - ✨ Add jms as an extra integration name where there is JMS involved ([#​8933](DataDog/dd-trace-java#8933) - [@​vandonr](https://github.com/vandonr)) #### Kotlin instrumentation - ✨ Enable kotlin\_coroutine integration by default ([#​8848](DataDog/dd-trace-java#8848) - [@​mcculls](https://github.com/mcculls)) - 🧹 Rework Kotlin coroutines instrumentation around coroutine context ([#​8774](DataDog/dd-trace-java#8774) - [@​mcculls](https://github.com/mcculls)) #### OpenTelemetry instrumentation - 🐛 Support WithSpan inheritContext attribute ([#​8858](DataDog/dd-trace-java#8858) - [@​amarziali](https://github.com/amarziali)) - ✨ Add context API support OTel propagators ([#​8770](DataDog/dd-trace-java#8770) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) #### Play Framework instrumentation - 🐛 Fix the Play Framework's span resource name priority so that the client JAX-RS 404 cannot override it ([#​8591](DataDog/dd-trace-java#8591) - [@​ygree](https://github.com/ygree)) #### Quarkus Instrumentation - 🐛 Ignore quarkus jaxrs stubs and cdi wrapper proxies ([#​8891](DataDog/dd-trace-java#8891) - [@​amarziali](https://github.com/amarziali)) #### ServiceTalk - ✨ Improve ServiceTalk Captured Context API Instrumentation for v0.42.56+ ([#​8821](DataDog/dd-trace-java#8821) - [@​ygree](https://github.com/ygree)) #### Spring instrumentation - ✨ Supporting Baggage for Instrumentations used in Weblog Tests ([#​8773](Dat 899F aDog/dd-trace-java#8773) - [@​mhlidd](https://github.com/mhlidd)) #### WebSocket Instrumentation - 💡 Trace websocket for spring webflux reactive handlers ([#​8831](DataDog/dd-trace-java#8831) - [@​amarziali](https://github.com/amarziali)) - 💡:test\_tube: WebSocket support for Netty ([#​8632](DataDog/dd-trace-java#8632) - [@​ValentinZakharov](https://github.com/ValentinZakharov)) #### Zio Instrumentation - 🧹 Cleanup Zio fiber instrumentation to avoid repeated activation of continuation ([#​8798](DataDog/dd-trace-java#8798) - [@​mcculls](https://github.com/mcculls)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: 9207366cdb6a1bd098082305d354a0a3c4622d7a
What Does This Do
Avoid adding terminated contexts as span links and clearing them if not needed.
Motivation
The recent trace propagation behavior complicated the context propagation and ended up creating span links that can be clear if context is restart.
In addition, it can unexpectedly void customer manually added span links 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: LANGPLAT-452