-
Notifications
You must be signed in to change notification settings - Fork 318
Instrument Runtime.exit() to finish spark application spans #8572
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
|
|
||
| @Override | ||
| public String instrumentedType() { | ||
| return "java.lang.Runtime"; |
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.
We already instrument java.lang.Shutdown in ShutdownInstrumentation - this calls ShutdownHelper.shutdownAgent() which in turn calls Agent.shutdown() to safely close out various components.
Other components register a shutdown hook with the JVM using the public API.
I'd prefer it if one of these existing approaches could be (re)used, rather than introduce yet another form of shutdown hook.
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.
Created a new Instrumentation for Runtime.exit() in order to:
- capture the exit code
- inject it only when data jobs is enabled
It should not change much to instrument the Shutdown.exit() method in the ShutdownInstrumentation instead, but it means that it would be injected for everyone, not only when data jobs is enabled
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 65 metrics, 6 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.48.0-SNAPSHOT~62109bfe23, baseline=1.48.0-SNAPSHOT~3e2867a84a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056619
Total [baseline] (8.669 s) : 0, 8668999
Agent [candidate] (1.049 s) : 0, 1048781
Total [candidate] (8.677 s) : 0, 8677405
section iast
Agent [baseline] (1.178 s) : 0, 1178151
Total [baseline] (9.217 s) : 0, 9216651
Agent [candidate] (1.187 s) : 0, 1187412
Total [candidate] (9.267 s) : 0, 9267364
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.192 s) : 0, 1191646
Total [baseline] (9.255 s) : 0, 9254848
Agent [candidate] (1.178 s) : 0, 1178053
Total [candidate] (9.196 s) : 0, 9195529
section iast_TELEMETRY_OFF
Agent [baseline] (1.169 s) : 0, 1169353
Total [baseline] (9.248 s) : 0, 9247547
Agent [candidate] (1.183 s) : 0, 1182521
Total [candidate] (9.285 s) : 0, 9285363
gantt
title insecure-bank - break down per module: candidate=1.48.0-SNAPSHOT~62109bfe23, baseline=1.48.0-SNAPSHOT~3e2867a84a
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (723.017 ms) : 0, 723017
BytebuddyAgent [candidate] (719.022 ms) : 0, 719022
GlobalTracer [baseline] (240.765 ms) : 0, 240765
GlobalTracer [candidate] (240.197 ms) : 0, 240197
AppSec [baseline] (55.04 ms) : 0, 55040
AppSec [candidate] (54.303 ms) : 0, 54303
Debugger [baseline] (4.435 ms) : 0, 4435
Debugger [candidate] (4.352 ms) : 0, 4352
Remote Config [baseline] (713.776 µs) : 0, 714
Remote Config [candidate] (702.688 µs) : 0, 703
Telemetry [baseline] (16.592 ms) : 0, 16592
Telemetry [candidate] (14.24 ms) : 0, 14240
section iast
BytebuddyAgent [baseline] (840.074 ms) : 0, 840074
BytebuddyAgent [candidate] (847.066 ms) : 0, 847066
GlobalTracer [baseline] (229.653 ms) : 0, 229653
GlobalTracer [candidate] (231.463 ms) : 0, 231463
IAST [baseline] (22.881 ms) : 0, 22881
IAST [candidate] (23.009 ms) : 0, 23009
AppSec [baseline] (56.007 ms) : 0, 56007
AppSec [candidate] (56.192 ms) : 0, 56192
Debugger [baseline] (4.173 ms) : 0, 4173
Debugger [candidate] (4.159 ms) : 0, 4159
Remote Config [baseline] (606.088 µs) : 0, 606
Remote Config [candidate] (599.2 µs) : 0, 599
Telemetry [baseline] (8.771 ms) : 0, 8771
Telemetry [candidate] (8.794 ms) : 0, 8794
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (850.662 ms) : 0, 850662
BytebuddyAgent [candidate] (839.232 ms) : 0, 839232
GlobalTracer [baseline] (231.946 ms) : 0, 231946
GlobalTracer [candidate] (230.543 ms) : 0, 230543
IAST [baseline] (22.911 ms) : 0, 22911
IAST [candidate] (22.85 ms) : 0, 22850
AppSec [baseline] (56.256 ms) : 0, 56256
AppSec [candidate] (55.867 ms) : 0, 55867
Debugger [baseline] (4.165 ms) : 0, 4165
Debugger [candidate] (4.175 ms) : 0, 4175
Remote Config [baseline] (614.45 µs) : 0, 614
Remote Config [candidate] (592.501 µs) : 0, 593
Telemetry [baseline] (8.82 ms) : 0, 8820
Telemetry [candidate] (8.774 ms) : 0, 8774
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (832.423 ms) : 0, 832423
BytebuddyAgent [candidate] (842.738 ms) : 0, 842738
GlobalTracer [baseline] (229.543 ms) : 0, 229543
GlobalTracer [candidate] (231.874 ms) : 0, 231874
IAST [baseline] (23.714 ms) : 0, 23714
IAST [candidate] (22.438 ms) : 0, 22438
AppSec [baseline] (54.451 ms) : 0, 54451
AppSec [candidate] (55.981 ms) : 0, 55981
Debugger [baseline] (4.142 ms) : 0, 4142
Debugger [candidate] (4.124 ms) : 0, 4124
Remote Config [baseline] (599.022 µs) : 0, 599
Remote Config [candidate] (602.814 µs) : 0, 603
Telemetry [baseline] (8.637 ms) : 0, 8637
Telemetry [candidate] (8.706 ms) : 0, 8706
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.48.0-SNAPSHOT~62109bfe23, baseline=1.48.0-SNAPSHOT~3e2867a84a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1047357
Total [baseline] (10.563 s) : 0, 10562892
Agent [candidate] (1.049 s) : 0, 1049118
Total [candidate] (10.472 s) : 0, 10472277
section appsec
Agent [baseline] (1.192 s) : 0, 1192033
Total [baseline] (10.721 s) : 0, 10720536
Agent [candidate] (1.189 s) : 0, 1188926
Total [candidate] (10.737 s) : 0, 10737016
section iast
Agent [baseline] (1.184 s) : 0, 1184176
Total [baseline] (11.062 s) : 0, 11061615
Agent [candidate] (1.178 s) : 0, 1177811
Total [candidate] (10.96 s) : 0, 10960281
section profiling
Agent [baseline] (1.279 s) : 0, 1279457
Total [baseline] (10.867 s) : 0, 10866683
Agent [candidate] (1.269 s) : 0, 1268896
Total [candidate] (10.837 s) : 0, 10836566
gantt
title petclinic - break down per module: candidate=1.48.0-SNAPSHOT~62109bfe23, baseline=1.48.0-SNAPSHOT~3e2867a84a
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (719.001 ms) : 0, 719001
BytebuddyAgent [candidate] (719.861 ms) : 0, 719861
GlobalTracer [baseline] (239.56 ms) : 0, 239560
GlobalTracer [candidate] (240.084 ms) : 0, 240084
AppSec [baseline] (54.865 ms) : 0, 54865
AppSec [candidate] (54.586 ms) : 0, 54586
Debugger [baseline] (5.863 ms) : 0, 5863
Debugger [candidate] (4.366 ms) : 0, 4366
Remote Config [baseline] (717.105 µs) : 0, 717
Remote Config [candidate] (707.623 µs) : 0, 708
Telemetry [baseline] (11.382 ms) : 0, 11382
Telemetry [candidate] (13.514 ms) : 0, 13514
section appsec
BytebuddyAgent [baseline] (738.628 ms) : 0, 738628
BytebuddyAgent [candidate] (736.79 ms) : 0, 736790
GlobalTracer [baseline] (236.89 ms) : 0, 236890
GlobalTracer [candidate] (236.319 ms) : 0, 236319
IAST [baseline] (21.536 ms) : 0, 21536
IAST [candidate] (21.299 ms) : 0, 21299
AppSec [baseline] (175.862 ms) : 0, 175862
AppSec [candidate] (175.386 ms) : 0, 175386
Debugger [baseline] (4.298 ms) : 0, 4298
Debugger [candidate] (4.289 ms) : 0, 4289
Remote Config [baseline] (642.985 µs) : 0, 643
Remote Config [candidate] (647.669 µs) : 0, 648
Telemetry [baseline] (8.915 ms) : 0, 8915
Telemetry [candidate] (8.929 ms) : 0, 8929
section iast
BytebuddyAgent [baseline] (844.362 ms) : 0, 844362
BytebuddyAgent [candidate] (839.285 ms) : 0, 839285
GlobalTracer [baseline] (231.15 ms) : 0, 231150
GlobalTracer [candidate] (230.376 ms) : 0, 230376
IAST [baseline] (23.046 ms) : 0, 23046
IAST [candidate] (22.812 ms) : 0, 22812
AppSec [baseline] (55.963 ms) : 0, 55963
AppSec [candidate] (55.899 ms) : 0, 55899
Debugger [baseline] (4.201 ms) : 0, 4201
Debugger [candidate] (4.183 ms) : 0, 4183
Remote Config [baseline] (608.029 µs) : 0, 608
Remote Config [candidate] (625.7 µs) : 0, 626
Telemetry [baseline] (8.821 ms) : 0, 8821
Telemetry [candidate] (8.732 ms) : 0, 8732
section profiling
BytebuddyAgent [baseline] (714.569 ms) : 0, 714569
BytebuddyAgent [candidate] (709.393 ms) : 0, 709393
GlobalTracer [baseline] (351.741 ms) : 0, 351741
GlobalTracer [candidate] (349.523 ms) : 0, 349523
AppSec [baseline] (54.857 ms) : 0, 54857
AppSec [candidate] (53.174 ms) : 0, 53174
Debugger [baseline] (4.315 ms) : 0, 4315
Debugger [candidate] (4.26 ms) : 0, 4260
Remote Config [baseline] (709.594 µs) : 0, 710
Remote Config [candidate] (699.424 µs) : 0, 699
Telemetry [baseline] (9.02 ms) : 0, 9020
Telemetry [candidate] (8.931 ms) : 0, 8931
ProfilingAgent [baseline] (102.455 ms) : 0, 102455
ProfilingAgent [candidate] (101.387 ms) : 0, 101387
Profiling [baseline] (102.48 ms) : 0, 102480
Profiling [candidate] (101.414 ms) : 0, 101414
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 13 metrics, 17 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~62109bfe23, baseline=1.48.0-SNAPSHOT~3e2867a84a
dateFormat X
axisFormat %s
section baseline
no_agent (380.673 µs) : 361, 400
. : milestone, 381,
iast (508.021 µs) : 486, 530
. : milestone, 508,
iast_FULL (725.207 µs) : 703, 747
. : milestone, 725,
iast_GLOBAL (550.85 µs) : 529, 572
. : milestone, 551,
iast_HARDCODED_SECRET_DISABLED (511.535 µs) : 490, 533
. : milestone, 512,
iast_INACTIVE (461.01 µs) : 440, 482
. : milestone, 461,
iast_TELEMETRY_OFF (496.236 µs) : 474, 519
. : milestone, 496,
tracing (454.258 µs) : 433, 475
. : milestone, 454,
section candidate
no_agent (375.431 µs) : 356, 395
. : milestone, 375,
iast (504.88 µs) : 483, 527
. : milestone, 505,
iast_FULL (725.504 µs) : 704, 747
. : milestone, 726,
iast_GLOBAL (559.438 µs) : 537, 582
. : milestone, 559,
iast_HARDCODED_SECRET_DISABLED (503.869 µs) : 482, 525
. : milestone, 504,
iast_INACTIVE (462.79 µs) : 441, 485
. : milestone, 463,
iast_TELEMETRY_OFF (500.27 µs) : 477, 523
. : milestone, 500,
tracing (451.231 µs) : 431, 472
. : milestone, 451,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.48.0-SNAPSHOT~62109bfe23, baseline=1.48.0-SNAPSHOT~3e2867a84a
dateFormat X
axisFormat %s
section baseline
no_agent (1.358 ms) : 1338, 1378
. : milestone, 1358,
appsec (1.726 ms) : 1703, 1749
. : milestone, 1726,
appsec_no_iast (1.74 ms) : 1718, 1763
. : milestone, 1740,
code_origins (1.681 ms) : 1654, 1707
. : milestone, 1681,
iast (1.499 ms) : 1475, 1523
. : milestone, 1499,
profiling (1.562 ms) : 1538, 1586
. : milestone, 1562,
tracing (1.495 ms) : 1470, 1521
. : milestone, 1495,
section candidate
no_agent (1.37 ms) : 1351, 1389
. : milestone, 1370,
appsec (1.737 ms) : 1714, 1761
. : milestone, 1737,
appsec_no_iast (1.72 ms) : 1696, 1745
. : milestone, 1720,
code_origins (1.691 ms) : 1664, 1717
. : milestone, 1691,
iast (1.505 ms) : 1481, 1529
. : milestone, 1505,
profiling (1.521 ms) : 1496, 1546
. : milestone, 1521,
tracing (1.473 ms) : 1447, 1498
. : milestone, 1473,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~62109bfe23, baseline=1.48.0-SNAPSHOT~3e2867a84a
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (2.344 ms) : 2300, 2387
. : milestone, 2344,
iast (2.123 ms) : 2068, 2178
. : milestone, 2123,
iast_GLOBAL (2.163 ms) : 2108, 2219
. : milestone, 2163,
profiling (2.454 ms) : 2271, 2636
. : milestone, 2454,
tracing (1.947 ms) : 1905, 1989
. : milestone, 1947,
section candidate
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (2.35 ms) : 2306, 2395
. : milestone, 2350,
iast (2.123 ms) : 2068, 2179
. : milestone, 2123,
iast_GLOBAL (2.166 ms) : 2110, 2222
. : milestone, 2166,
profiling (1.976 ms) : 1932, 2019
. : milestone, 1976,
tracing (1.948 ms) : 1906, 1990
. : milestone, 1948,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.48.0-SNAPSHOT~62109bfe23, baseline=1.48.0-SNAPSHOT~3e2867a84a
dateFormat X
axisFormat %s
section baseline
no_agent (15.013 s) : 15013000, 15013000
. : milestone, 15013000,
appsec (15.073 s) : 15073000, 15073000
. : milestone, 15073000,
iast (18.734 s) : 18734000, 18734000
. : milestone, 18734000,
iast_GLOBAL (17.47 s) : 17470000, 17470000
. : milestone, 17470000,
profiling (15.025 s) : 15025000, 15025000
. : milestone, 15025000,
tracing (15.309 s) : 15309000, 15309000
. : milestone, 15309000,
section candidate
no_agent (15.465 s) : 15465000, 15465000
. : milestone, 15465000,
appsec (15.095 s) : 15095000, 15095000
. : milestone, 15095000,
iast (18.603 s) : 18603000, 18603000
. : milestone, 18603000,
iast_GLOBAL (18.129 s) : 18129000, 18129000
. : milestone, 18129000,
profiling (15.683 s) : 15683000, 15683000
. : milestone, 15683000,
tracing (14.955 s) : 14955000, 14955000
. : milestone, 14955000,
|
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | org.flywaydb.flyway | plugin | misk/gradle/libs.versions.toml | gradle | minor | `11.6.0` -> `11.7.0` | | [com.squareup.okio:okio-fakefilesystem](https://github.com/square/okio) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `3.10.2` -> `3.11.0` | | [com.squareup.okio:okio](https://github.com/square/okio) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `3.10.2` -> `3.11.0` | | [com.autonomousapps.dependency-analysis](https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin) | plugin | misk/gradle/libs.versions.toml | gradle | minor | `2.15.0` -> `2.16.0` | | [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.47.3` -> `1.48.1` | | [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.47.3` -> `1.48.1` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.18` -> `2.31.20` | | [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.18` -> `2.31.20` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.18` -> `2.31.20` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.18` -> `2.31.20` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.18` -> `2.31.20` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.18` -> `2.31.20` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.31.18` -> `2.31.20` | --- ### Release Notes <details> <summary>square/okio (com.squareup.okio:okio-fakefilesystem)</summary> ### [`v3.11.0`](https://github.com/square/okio/blob/HEAD/CHANGELOG.md#Version-3110) *2025-04-09* - Fix: Clear the deflater's byte array reference - New: Faster implementation of `String.decodeHex()` on Kotlin/JS. - New: Declare `EXACTLY_ONCE` execution for blocks like `Closeable.use {}` and `FileSystem.read {}`. - Upgrade: \[Kotlin 2.1.20]\[kotlin\_2\_1\_20]. </details> <details> <summary>autonomousapps/dependency-analysis-android-gradle-plugin (com.autonomousapps.dependency-analysis)</summary> ### [`v2.16.0`](https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/blob/HEAD/CHANGELOG.md#Version-2160) - \[Feat]: support `com.android.test` projects. - \[Feat]: support typesafe project accessors with opt-in. ```kotlin dependencyAnalysis { useTypesafeProjectAccessors(true) // false by default } ``` </details> <details> <summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary> ### [`v1.48.1`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.48.1): 1.48.1 ### Components #### Tracer internal logging - 🐛 Remove print line causing unnecessary logs ([#​8687](DataDog/dd-trace-java#8687) - [@​sarahchen6](https://github.com/sarahchen6)) ### [`v1.48.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.48.0): 1.48.0 ### Known Bugs > \[!NOTE] > If you are experiencing issues with spamming timeout logs, please update to the [latest version](https://github.com/DataDog/dd-trace-java/releases/latest) or set [JDK_SOCKET_ENABLED](https://github.com/DataDog/dd-trace-java/blob/33fc3c9a9b7cda3beda88b8b3e5224ae2b10764a/dd-trace-api/src/main/java/datadog/trace/api/config/GeneralConfig.java#L98) to false. ### Components #### Application Security Management (IAST) - ✨ Fix vulnerability location org.jose4j.lang.HashUtil ([#​8610](DataDog/dd-trace-java#8610) - [@​jandro996](https://github.com/jandro996)) - ✨ Fix weak randomness in oracle.ucp.util.OpaqueString ([#​8609](DataDog/dd-trace-java#8609) - [@​jandro996](https://github.com/jandro996)) - ✨ Fix weak hash false positive in oracle.security.o5logon.O5Logon ([#​8608](DataDog/dd-trace-java#8608) - [@​jandro996](https://github.com/jandro996)) - 🐛 Prevent before callsites targeting constructors in super calls ([#​8549](DataDog/dd-trace-java#8549) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) #### Application Security Management (WAF) - ✨ Update login events public SDK to V2 ([#​8620](DataDog/dd-trace-java#8620) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - 🐛 Send RASP LFI capability only when AppSec is statically enabled ([#​8573](DataDog/dd-trace-java#8573) - [@​jandro996](https://github.com/jandro996)) - ✨ Improve detection of missing request end events ([#​8510](DataDog/dd-trace-java#8510) - [@​smola](https://github.com/smola)) - 🧹 Remove remote configuration for API Security sampling rate ([#​8486](DataDog/dd-trace-java#8486) - [@​smola](https://github.com/smola)) - ✨ Add setUser to user monitoring SDK ([#​8482](DataDog/dd-trace-java#8482) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Add missing address for signup event ([#​8469](DataDog/dd-trace-java#8469) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Allow login events SDK to be used with appsec disabled ([#​8464](DataDog/dd-trace-java#8464) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Add support for endpoint discovery in spring mvc ([#​8352](DataDog/dd-trace-java#8352) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ New API Security sampling algorithm ([#​8178](DataDog/dd-trace-java#8178) - [@​ValentinZakharov](https://github.com/ValentinZakharov)) #### Build & Tooling - ✨ Add buffer size customizability to JDK UDS support ([#​8629](DataDog/dd-trace-java#8629) - [@​sarahchen6](https://github.com/sarahchen6)) - ✨ Add JDK built-in support for UDS on Java 16+ ([#​8314](DataDog/dd-trace-java#8314) - [@​sarahchen6](https://github.com/sarahchen6)) #### Configuration at Runtime - 🐛 Send RASP LFI capability only when AppSec is statically enabled ([#​8573](DataDog/dd-trace-java#8573) - [@​jandro996](https://github.com/jandro996)) #### Continuous Integration Visibility - 🐛 Prevent double reporting of Scalatest events when using SBT with test forking ([#​8682](DataDog/dd-trace-java#8682) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Shutdown CI Visibility test event handlers before tracer ([#​8677](DataDog/dd-trace-java#8677) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Do not apply JUnit 4 instrumentation to MUnit runners ([#​8675](DataDog/dd-trace-java#8675), [#​8683](DataDog/dd-trace-java#8683) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Remove error log when source path resolution fails on isModified check ([#​8663](DataDog/dd-trace-java#8663) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - ✨ Implement tests reordering for JUnit 4 ([#​8650](DataDog/dd-trace-java#8650) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - 🐛 Set default Attempt to Fix retries if none provided from the backend ([#​8615](DataDog/dd-trace-java#8615) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - ✨ Allow to manually set PR info ([#​8566](DataDog/dd-trace-java#8566) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Fix Test Optimization init when repo root cannot be determined ([#​8533](DataDog/dd-trace-java#8533) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Add capabilities tagging ([#​8499](DataDog/dd-trace-java#8499), [#​8540](DataDog/dd-trace-java#8540) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) #### Crash tracking - 🐛 Remove dependency on bash from crash/oome uploder scripts ([#​8652](DataDog/dd-trace-java#8652) - [@​jbachorik](https://github.com/jbachorik)) #### Data Streams Monitoring - ✨ e2e pipeline configuration when data jobs is enabled ([#​8553](DataDog/dd-trace-java#8553) - [@​kr-igor](https://github.com/kr-igor)) #### Dynamic Instrumentation - 🐛 Fix In-Product when config is empty ([#​8679](DataDog/dd-trace-java#8679) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Add support for filtering shaded third-party libs ([#​8612](DataDog/dd-trace-java#8612) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Add In-Product Enablement ([#​8587](DataDog/dd-trace-java#8587) - [@​jpbempel](https://github.com/jpbempel)) - ✨⚡ Reduce footprint of SourceFile tracking ([#​8524](DataDog/dd-trace-java#8524) - [@​jpbempel](https://github.com/jpbempel)) - ✨⚡ Optimize the SourceFile tracking ([#​8520](DataDog/dd-trace-java#8520) - [@​jpbempel](https://github.com/jpbempel)) #### OpenTracing - 🧹 Remove activeScope() use in OpenTracing shim ([#​8478](DataDog/dd-trace-java#8478) - [@​mcculls](https://github.com/mcculls)) #### Profiling - ✨ Add profiler env check command to AgentCLI ([#​8671](DataDog/dd-trace-java#8671) - [@​jbachorik](https://github.com/jbachorik)) - ✨ Bump ddprof to 1.23.0 ([#​8668](DataDog/dd-trace-java#8668) - [@​jbachorik](https://github.com/jbachorik)) - Fix a crash related to ElfParser::loadSymbolTable ([#​191](DataDog/dd-trace-java#191)) by [@​yanglong1010](https://github.com/yanglong1010) in DataDog/java-profiler#192 - Unwind String.indexOf intrinsic on AArch64 by [@​MattAlp](https://github.com/MattAlp) in DataDog/java-profiler#193 - Fix Java 24 support by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#194 - A set of fixes related to clang, aarch64 and musl pecularities of vmstructs stack unwinder by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#199 - 🐛 Remove process information from JFR recording ([#​8661](DataDog/dd-trace-java#8661) - [@​r1viollet](https://github.com/r1viollet)) - 🐛 Make TempLocationManager USER aware ([#​8605](DataDog/dd-trace-java#8605) - [@​jbachorik](https://github.com/jbachorik)) - ✨ Extract git tags from embedded git.properties and datadog_git.properties ([#​8561](DataDog/dd-trace-java#8561) - [@​wmouchere](https://github.com/wmouchere)) #### Telemetry - 🐛 Fix appsec.rasp.error and appsec.waf.error telemetry metrics ([#​8624](DataDog/dd-trace-java#8624) - [@​jandro996](https://github.com/jandro996)) - ✨ Create metric: appsec.rasp.rule.skipped ([#​8618](DataDog/dd-trace-java#8618) - [@​jandro996](https://github.com/jandro996)) - ✨ Extract git tags from embedded git.properties and datadog_git.properties ([#​8561](DataDog/dd-trace-java#8561) - [@​wmouchere](https://github.com/wmouchere)) #### Testing - 🧹 Simplify ssi tests one-pipeline ([#​8558](DataDog/dd-trace-java#8558) - [@​robertomonteromiguel](https://github.com/robertomonteromiguel)) - ✨ Add smoke tests for java's concurrent API ([#​8438](DataDog/dd-trace-java#8438) - [@​sarahchen6](https://github.com/sarahchen6)) #### Trace context propagation - ✨ Adding Support for `TRACE_PROPAGATION_BEHAVIOR_EXTRACT` ([#​8535](DataDog/dd-trace-java#8535) - [@​mhlidd](https://github.com/mhlidd)) #### Tracer core - 🐛 Ensure shaded helpers have unique names ([#​8559](DataDog/dd-trace-java#8559) - [@​amarziali](https://github.com/amarziali)) - ✨ Support common config sources for user-provided git info ([#​8547](DataDog/dd-trace-java#8547) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Make the default config sources more robust when a security manager is installed ([#​8544](DataDog/dd-trace-java#8544) - [@​mcculls](https://github.com/mcculls)) - ✨ Support targeting services with configurations in stable configuration file ([#​8526](DataDog/dd-trace-java#8526) - [@​mtoffl01](https://github.com/mtoffl01)) - ✨ Add new parser for `DD_TAGS` and prioritizing `DD_SERVICE` ([#​8296](DataDog/dd-trace-java#8296) - [@​mhlidd](https://github.com/mhlidd)) #### Tracer internal logging - 🐛 Add missing debug log for the cloudPayloadTaggingServices config ([#​8600](DataDog/dd-trace-java#8600) - [@​ygree](https://github.com/ygree)) - ✨ Add the possibility to output the logs of the Java tracer in JSON ([#​8083](DataDog/dd-trace-java#8083) - [@​cecile75](https://github.com/cecile75)) #### Tracer public API - ✨ Introducing `DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED` Config ([#​8536](DataDog/dd-trace-java#8536) - [@​mhlidd](https://github.com/mhlidd)) - ✨ Config Consistency Round 2 ([#​8489](DataDog/dd-trace-java#8489) - [@​mhlidd](https://github.com/mhlidd)) ### Instrumentations #### - 🐛 Fix NPE in getMdcCopy of LoggingEventInstrumentation ([#​8599](DataDog/dd-trace-java#8599) - [@​ygree](https://github.com/ygree)) #### Apache Spark instrumentation - ✨ Instrument Runtime.exit() to finish spark application spans ([#​8572](DataDog/dd-trace-java#8572) - [@​paul-laffon-dd](https://github.com/paul-laffon-dd)) - ✨ Configure OpenLineage if present in Spark instrumentation ([#​8541](DataDog/dd-trace-java#8541) - [@​mobuchowski](https://github.com/mobuchowski)) #### Armeria Instrumentation - ✨ Support armeria grpc 1.32.3 ([#​8606](DataDog/dd-trace-java#8606) - [@​github-actions](https://github.com/github-actions)\[bot]) #### AWS DynamoDB Instrumentation - ✨ Create DynamoDB instrumentation + add span pointers for `updateItem` and `deleteItem` ([#​8490](DataDog/dd-trace-java#8490) - [@​nhulston](https://github.com/nhulston)) #### AWS SDK instrumentation - ✨ Add DynamoDB in DEFAULT_TRACE_CLOUD_PAYLOAD_TAGGING_SERVICES ([#​8595](DataDog/dd-trace-java#8595) - [@​joeyzhao2018](https://github.com/joeyzhao2018)) #### Azure Functions instrumentation - ✨ Enable tracer computed trace metrics by default for Azure Functions ([#​8518](DataDog/dd-trace-java#8518) - [@​duncanpharvey](https://github.com/duncanpharvey)) - 💡 Add azure-functions instrumentation ([#​8432](DataDog/dd-trace-java#8432) - [@​duncanpharvey](https://github.com/duncanpharvey)) #### Core Java language instrumentation - 🐛 Fix ForkJoinPool.execute() instrumentation on Java 21+ ([#​8560](DataDog/dd-trace-java#8560) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) #### Eclipse Vert.x instrumentation - ✨ Add vertx postgresql client instrumentation ([#​8471](DataDog/dd-trace-java#8471) - [@​vandonr](https://github.com/vandonr) - thanks for the contribution!) #### Kafka instrumentation - ✨ Support and test kafka-clients 4 ([#​8581](DataDog/dd-trace-java#8581) - [@​amarziali](https://github.com/amarziali)) #### Kotlin instrumentation - ✨ Avoid disconnected traces when using Kotlin flowOn ([#​8651](DataDog/dd-trace-java#8651) - [@​mcculls](https://github.com/mcculls)) #### OpenTelemetry instrumentation - 🧹 Migrate OtelContext wrapper to new internal Context API ([#​8645](DataDog/dd-trace-java#8645) - [@​mcculls](https://github.com/mcculls)) #### Spring instrumentation - 🐛 Support CompletableFuture on spring webmvc controllers ([#​8659](DataDog/dd-trace-java#8659) - [@​amarziali](https://github.com/amarziali)) - ✨ Add support for endpoint discovery in spring mvc ([#​8352](DataDog/dd-trace-java#8352) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) #### WebSocket Instrumentation - ✨ Instrument Jetty websocket pojo ([#​8562](DataDog/dd-trace-java#8562) - [@​amarziali](https://github.com/amarziali)) - 💡 Instrument Java Websocket API (JSR356) ([#​8440](DataDog/dd-trace-java#8440) - [@​amarziali](https://github.com/amarziali)) #### All other instrumentations - ✨ Introduce cache for peer.hostname lookup ([#​8601](DataDog/dd-trace-java#8601) - [@​mcculls](https://github.com/mcculls)) - ✨ Support pekko http 1.1 ([#​8532](DataDog/dd-trace-java#8532) - [@​amarziali](https://github.com/amarziali)) </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**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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: 331314f71acaced3adc75ea5d7e855c248d593fc
What Does This Do
Instrument Runtime.exit() to finish spark application spans
Motivation
Explicitly exiting spark using
System.exit(code)will bypass the regular code to finish spark application spansWe are currently using a shutdown hook https://github.com/DataDog/dd-trace-java/blob/v1.47.2/dd-java-agent/instrumentation/spark/src/main/java/datadog/trace/instrumentation/spark/AbstractDatadogSparkListener.java#L139-L153, but it is only best effort:
Instrumenting the
Runtime.exit()allow to prevent those drawbacksAdditional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]