-
Notifications
You must be signed in to change notification settings - Fork 301
Inject trace context into AWS Step Functions input #7585
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
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.
Using reflection is not efficient and should be avoided. Instead, MethodHandles can be used.
The pull request lacks also of a minimum test coverage. Test must be added
...s-java-sdk-2.2/src/main/java/datadog/trace/instrumentation/aws/v2/AwsSdkClientDecorator.java
Outdated
Show resolved
Hide resolved
...s-java-sdk-2.2/src/main/java/datadog/trace/instrumentation/aws/v2/AwsSdkClientDecorator.java
Outdated
Show resolved
Hide resolved
...s-java-sdk-2.2/src/main/java/datadog/trace/instrumentation/aws/v2/AwsSdkClientDecorator.java
Outdated
Show resolved
Hide resolved
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 5 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.47.0-SNAPSHOT~0f304c70e2, baseline=1.47.0-SNAPSHOT~0ba7b76f47
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1046545
Total [baseline] (10.481 s) : 0, 10480652
Agent [candidate] (1.039 s) : 0, 1039401
Total [candidate] (10.404 s) : 0, 10404299
section appsec
Agent [baseline] (1.19 s) : 0, 1190476
Total [baseline] (10.77 s) : 0, 10770225
Agent [candidate] (1.186 s) : 0, 1186132
Total [candidate] (10.793 s) : 0, 10792992
section iast
Agent [baseline] (1.178 s) : 0, 1178280
Total [baseline] (11.118 s) : 0, 11117690
Agent [candidate] (1.177 s) : 0, 1177372
Total [candidate] (11.072 s) : 0, 11072120
section profiling
Agent [baseline] (1.267 s) : 0, 1266717
Total [baseline] (10.897 s) : 0, 10897019
Agent [candidate] (1.273 s) : 0, 1273115
Total [candidate] (10.942 s) : 0, 10942347
gantt
title petclinic - break down per module: candidate=1.47.0-SNAPSHOT~0f304c70e2, baseline=1.47.0-SNAPSHOT~0ba7b76f47
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (722.382 ms) : 0, 722382
BytebuddyAgent [candidate] (716.243 ms) : 0, 716243
GlobalTracer [baseline] (240.886 ms) : 0, 240886
GlobalTracer [candidate] (239.144 ms) : 0, 239144
AppSec [baseline] (55.76 ms) : 0, 55760
AppSec [candidate] (55.169 ms) : 0, 55169
Remote Config [baseline] (706.304 Β΅s) : 0, 706
Remote Config [candidate] (699.777 Β΅s) : 0, 700
Telemetry [baseline] (11.489 ms) : 0, 11489
Telemetry [candidate] (12.98 ms) : 0, 12980
section appsec
BytebuddyAgent [baseline] (739.239 ms) : 0, 739239
BytebuddyAgent [candidate] (736.343 ms) : 0, 736343
GlobalTracer [baseline] (238.36 ms) : 0, 238360
GlobalTracer [candidate] (236.875 ms) : 0, 236875
AppSec [baseline] (177.686 ms) : 0, 177686
AppSec [candidate] (177.874 ms) : 0, 177874
Remote Config [baseline] (677.253 Β΅s) : 0, 677
Remote Config [candidate] (659.977 Β΅s) : 0, 660
Telemetry [baseline] (8.301 ms) : 0, 8301
Telemetry [candidate] (8.268 ms) : 0, 8268
IAST [baseline] (21.728 ms) : 0, 21728
IAST [candidate] (21.623 ms) : 0, 21623
section iast
BytebuddyAgent [baseline] (841.327 ms) : 0, 841327
BytebuddyAgent [candidate] (839.209 ms) : 0, 839209
GlobalTracer [baseline] (231.326 ms) : 0, 231326
GlobalTracer [candidate] (232.179 ms) : 0, 232179
AppSec [baseline] (57.754 ms) : 0, 57754
AppSec [candidate] (57.894 ms) : 0, 57894
Remote Config [baseline] (617.929 Β΅s) : 0, 618
Remote Config [candidate] (627.842 Β΅s) : 0, 628
Telemetry [baseline] (8.77 ms) : 0, 8770
Telemetry [candidate] (8.888 ms) : 0, 8888
IAST [baseline] (23.008 ms) : 0, 23008
IAST [candidate] (23.321 ms) : 0, 23321
section profiling
ProfilingAgent [baseline] (96.867 ms) : 0, 96867
ProfilingAgent [candidate] (97.644 ms) : 0, 97644
BytebuddyAgent [baseline] (710.447 ms) : 0, 710447
BytebuddyAgent [candidate] (715.131 ms) : 0, 715131
GlobalTracer [baseline] (351.783 ms) : 0, 351783
GlobalTracer [candidate] (352.779 ms) : 0, 352779
AppSec [baseline] (55.592 ms) : 0, 55592
AppSec [candidate] (54.898 ms) : 0, 54898
Remote Config [baseline] (682.048 Β΅s) : 0, 682
Remote Config [candidate] (681.871 Β΅s) : 0, 682
Telemetry [baseline] (8.968 ms) : 0, 8968
Telemetry [candidate] (9.046 ms) : 0, 9046
Profiling [baseline] (96.891 ms) : 0, 96891
Profiling [candidate] (97.668 ms) : 0, 97668
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.47.0-SNAPSHOT~0f304c70e2, baseline=1.47.0-SNAPSHOT~0ba7b76f47
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.043 s) : 0, 1043443
Total [baseline] (8.641 s) : 0, 8640975
Agent [candidate] (1.04 s) : 0, 1040116
Total [candidate] (8.626 s) : 0, 8625758
section iast
Agent [baseline] (1.17 s) : 0, 1170028
Total [baseline] (9.277 s) : 0, 9277333
Agent [candidate] (1.177 s) : 0, 1177434
Total [candidate] (9.328 s) : 0, 9328304
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.171 s) : 0, 1170831
Total [baseline] (9.274 s) : 0, 9274286
Agent [candidate] (1.171 s) : 0, 1170518
Total [candidate] (9.213 s) : 0, 9213331
section iast_TELEMETRY_OFF
Agent [baseline] (1.165 s) : 0, 1165307
Total [baseline] (9.22 s) : 0, 9220210
Agent [candidate] (1.167 s) : 0, 1166916
Total [candidate] (9.26 s) : 0, 9260403
gantt
title insecure-bank - break down per module: candidate=1.47.0-SNAPSHOT~0f304c70e2, baseline=1.47.0-SNAPSHOT~0ba7b76f47
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (718.209 ms) : 0, 718209
BytebuddyAgent [candidate] (717.201 ms) : 0, 717201
GlobalTracer [baseline] (240.21 ms) : 0, 240210
GlobalTracer [candidate] (239.43 ms) : 0, 239430
AppSec [baseline] (56.256 ms) : 0, 56256
AppSec [candidate] (55.421 ms) : 0, 55421
Remote Config [baseline] (695.784 Β΅s) : 0, 696
Remote Config [candidate] (692.699 Β΅s) : 0, 693
Telemetry [baseline] (12.872 ms) : 0, 12872
Telemetry [candidate] (12.18 ms) : 0, 12180
section iast
BytebuddyAgent [baseline] (834.498 ms) : 0, 834498
BytebuddyAgent [candidate] (840.02 ms) : 0, 840020
GlobalTracer [baseline] (230.838 ms) : 0, 230838
GlobalTracer [candidate] (232.267 ms) : 0, 232267
IAST [baseline] (22.795 ms) : 0, 22795
IAST [candidate] (22.961 ms) : 0, 22961
AppSec [baseline] (57.255 ms) : 0, 57255
AppSec [candidate] (57.49 ms) : 0, 57490
Remote Config [baseline] (619.376 Β΅s) : 0, 619
Remote Config [candidate] (618.436 Β΅s) : 0, 618
Telemetry [baseline] (8.712 ms) : 0, 8712
Telemetry [candidate] (8.779 ms) : 0, 8779
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (834.413 ms) : 0, 834413
BytebuddyAgent [candidate] (835.558 ms) : 0, 835558
GlobalTracer [baseline] (230.972 ms) : 0, 230972
GlobalTracer [candidate] (230.506 ms) : 0, 230506
IAST [baseline] (22.932 ms) : 0, 22932
IAST [candidate] (22.723 ms) : 0, 22723
AppSec [baseline] (57.811 ms) : 0, 57811
AppSec [candidate] (57.174 ms) : 0, 57174
Remote Config [baseline] (619.165 Β΅s) : 0, 619
Remote Config [candidate] (599.033 Β΅s) : 0, 599
Telemetry [baseline] (8.861 ms) : 0, 8861
Telemetry [candidate] (8.629 ms) : 0, 8629
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (831.665 ms) : 0, 831665
BytebuddyAgent [candidate] (833.126 ms) : 0, 833126
GlobalTracer [baseline] (229.675 ms) : 0, 229675
GlobalTracer [candidate] (229.83 ms) : 0, 229830
IAST [baseline] (25.483 ms) : 0, 25483
IAST [candidate] (23.625 ms) : 0, 23625
AppSec [baseline] (54.02 ms) : 0, 54020
AppSec [candidate] (55.773 ms) : 0, 55773
Remote Config [baseline] (630.322 Β΅s) : 0, 630
Remote Config [candidate] (615.01 Β΅s) : 0, 615
Telemetry [baseline] (8.6 ms) : 0, 8600
Telemetry [candidate] (8.644 ms) : 0, 8644
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 11 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.47.0-SNAPSHOT~0f304c70e2, baseline=1.47.0-SNAPSHOT~0ba7b76f47
dateFormat X
axisFormat %s
section baseline
no_agent (378.684 Β΅s) : 359, 399
. : milestone, 379,
iast (518.91 Β΅s) : 497, 541
. : milestone, 519,
iast_FULL (727.718 Β΅s) : 706, 750
. : milestone, 728,
iast_GLOBAL (560.072 Β΅s) : 538, 582
. : milestone, 560,
iast_HARDCODED_SECRET_DISABLED (513.96 Β΅s) : 491, 537
. : milestone, 514,
iast_INACTIVE (460.46 Β΅s) : 439, 482
. : milestone, 460,
iast_TELEMETRY_OFF (501.622 Β΅s) : 478, 525
. : milestone, 502,
tracing (456.374 Β΅s) : 436, 477
. : milestone, 456,
section candidate
no_agent (377.078 Β΅s) : 357, 397
. : milestone, 377,
iast (517.392 Β΅s) : 495, 540
. : milestone, 517,
iast_FULL (730.088 Β΅s) : 708, 752
. : milestone, 730,
iast_GLOBAL (571.721 Β΅s) : 548, 596
. : milestone, 572,
iast_HARDCODED_SECRET_DISABLED (514.872 Β΅s) : 492, 537
. : milestone, 515,
iast_INACTIVE (464.346 Β΅s) : 443, 486
. : milestone, 464,
iast_TELEMETRY_OFF (500.604 Β΅s) : 479, 522
. : milestone, 501,
tracing (461.627 Β΅s) : 440, 483
. : milestone, 462,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.47.0-SNAPSHOT~0f304c70e2, baseline=1.47.0-SNAPSHOT~0ba7b76f47
dateFormat X
axisFormat %s
section baseline
no_agent (1.364 ms) : 1345, 1384
. : milestone, 1364,
appsec (1.737 ms) : 1713, 1761
. : milestone, 1737,
appsec_no_iast (1.767 ms) : 1744, 1790
. : milestone, 1767,
iast (1.516 ms) : 1492, 1540
. : milestone, 1516,
profiling (1.53 ms) : 1505, 1555
. : milestone, 1530,
tracing (1.499 ms) : 1475, 1524
. : milestone, 1499,
section candidate
no_agent (1.358 ms) : 1339, 1377
. : milestone, 1358,
appsec (1.768 ms) : 1744, 1792
. : milestone, 1768,
appsec_no_iast (1.776 ms) : 1753, 1799
. : milestone, 1776,
iast (1.526 ms) : 1502, 1550
. : milestone, 1526,
profiling (1.592 ms) : 1567, 1618
. : milestone, 1592,
tracing (1.487 ms) : 1462, 1512
. : milestone, 1487,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.47.0-SNAPSHOT~0f304c70e2, baseline=1.47.0-SNAPSHOT~0ba7b76f47
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1465, 1488
. : milestone, 1476,
appsec (2.381 ms) : 2337, 2424
. : milestone, 2381,
iast (2.127 ms) : 2072, 2183
. : milestone, 2127,
iast_GLOBAL (2.166 ms) : 2110, 2221
. : milestone, 2166,
profiling (1.969 ms) : 1925, 2013
. : milestone, 1969,
tracing (1.955 ms) : 1913, 1997
. : milestone, 1955,
section candidate
no_agent (1.475 ms) : 1464, 1487
. : milestone, 1475,
appsec (2.369 ms) : 2325, 2412
. : milestone, 2369,
iast (2.129 ms) : 2074, 2184
. : milestone, 2129,
iast_GLOBAL (2.159 ms) : 2103, 2214
. : milestone, 2159,
profiling (1.963 ms) : 1920, 2006
. : milestone, 1963,
tracing (1.961 ms) : 1919, 2004
. : milestone, 1961,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.47.0-SNAPSHOT~0f304c70e2, baseline=1.47.0-SNAPSHOT~0ba7b76f47
dateFormat X
axisFormat %s
section baseline
no_agent (14.792 s) : 14792000, 14792000
. : milestone, 14792000,
appsec (15.016 s) : 15016000, 15016000
. : milestone, 15016000,
iast (18.913 s) : 18913000, 18913000
. : milestone, 18913000,
iast_GLOBAL (17.864 s) : 17864000, 17864000
. : milestone, 17864000,
profiling (15.125 s) : 15125000, 15125000
. : milestone, 15125000,
tracing (14.984 s) : 14984000, 14984000
. : milestone, 14984000,
section candidate
no_agent (15.457 s) : 15457000, 15457000
. : milestone, 15457000,
appsec (14.983 s) : 14983000, 14983000
. : milestone, 14983000,
iast (18.338 s) : 18338000, 18338000
. : milestone, 18338000,
iast_GLOBAL (18.018 s) : 18018000, 18018000
. : milestone, 18018000,
profiling (15.247 s) : 15247000, 15247000
. : milestone, 15247000,
tracing (14.944 s) : 14944000, 14944000
. : milestone, 14944000,
|
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
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 left a bunch of comments about refactoring and testing
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
String ddTraceContextJSON = InputAttributeInjector.buildTraceContext(span); | ||
// Inject the trace context into the Step Function input | ||
StringBuilder modifiedInput = | ||
InputAttributeInjector.getModifiedInput(request.input(), ddTraceContextJSON); | ||
|
||
return request.toBuilder().input(modifiedInput.toString()).build(); |
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.
Can be deduplicated using a dedicated method:
SdkRequest injectTraceContext(request, span) {
String traceContext = InputAttributeInjector.buildTraceContext(span);
// Inject the trace context into the Step Function input
String modifiedInput = InputAttributeInjector.getModifiedInput(request.input(), traceContext);
return request.toBuilder().input(modifiedInput).build()
}
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.
Since I had to handle both StartExecutionRequest
and StartSyncExecutionRequest
param types I ended up doing method overloading for injectTraceContext()
dd-java-agent/instrumentation/aws-java-sfn-2.0/src/test/groovy/SfnClientTest.groovy
Outdated
Show resolved
Hide resolved
dd-java-agent/instrumentation/aws-java-sfn-2.0/src/test/groovy/SfnClientTest.groovy
Show resolved
Hide resolved
dd-java-agent/instrumentation/aws-java-sfn-2.0/src/test/groovy/SfnClientTest.groovy
Outdated
Show resolved
Hide resolved
dd-java-agent/instrumentation/aws-java-sfn-2.0/src/test/groovy/SfnClientTest.groovy
Outdated
Show resolved
Hide resolved
@PerfectSlayer I think I covered all of the comments/corrections, but for some reason the CI's muzzle check is continuing to fail :/ It seems like it's mostly timing out, so may be unrelated to my changes? |
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
.../aws-java-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/SfnInterceptor.java
Show resolved
Hide resolved
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'd like to see the Json construction done in a safer way.
I also think we should guard against exceptions propagating out of the listener.
Failures appear to be unrelated |
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.
Looking good from Platform PoV. I will let IDM review instrumentation.
About the failing tests, you can retry them following: https://github.com/DataDog/dd-trace-java/blob/master/docs/how_to_test.md#flaky-tests
// Prepend comma to separate from existing content | ||
modifiedInput.insert(endPos, String.format(",\"%s\":%s", DATADOG_KEY, ddTraceContextJSON)); | ||
} | ||
return modifiedInput.toString(); |
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.
This method could be made more performant with the following approach:
- skip trimming the string before finding
{
and}
to avoid creating an intermediate string - that would also let you use
request.indexOf('{')
etc. which is faster - compare the numerical positions of
{
and}
- if they're next to each other, no need to create/trim anything and you can return
"{" + DATADOG_KEY + ":" + ddTraceContextJSON + "}"
- otherwise get the substring between
{
and}
trim it and store it inexistingJSON
- if
existingJSON
is empty you can return"{" + DATADOG_KEY + ":" + ddTraceContextJSON + "}"
- otherwise return
"{" + existingJSON + "," + DATADOG_KEY + ":" + ddTraceContextJSON + "}"
- if they're next to each other, no need to create/trim anything and you can return
you could also extract DATADOG_KEY + ":" + ddTraceContextJSON
to a local variable to avoid repeating it
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.
Also I assume we know the original string will always be JSON?
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, the original string must be a JSON string (if empty, it must be {}
) in order for AWS to accept the request. However, the user could end up putting an incorrect json string; in that case, we should leave the request unchanged so that the error comes from AWS, not the tracer.
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
...a-sfn-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sfn/InputAttributeInjector.java
Outdated
Show resolved
Hide resolved
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.
Thanks for the work on this - I've suggested a couple of final improvements
Changes approved. PR can be merged
| 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.46.1` -> `1.47.0` | | [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.46.1` -> `1.47.0` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.33` -> `2.30.34` | | [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.33` -> `2.30.34` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.33` -> `2.30.34` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.33` -> `2.30.34` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.33` -> `2.30.34` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.33` -> `2.30.34` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.33` -> `2.30.34` | --- ### Release Notes <details> <summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary> ### [`v1.47.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.47.0): 1.47.0 ##### Components ##### Application Security Management (IAST) - π Exclude com.stripe.net.HttpURLConnectionClient to solve IAST SSRF vulnerability false positives ([#​8483](DataDog/dd-trace-java#8483) - [@​jandro996](https://github.com/jandro996)) - π Add exclusion to solve IAST weak randomness vulnerability false positives ([#​8462](DataDog/dd-trace-java#8462) - [@​jandro996](https://github.com/jandro996)) - β¨ Fix weak randomness false positive in Kafka client ([#​8408](DataDog/dd-trace-java#8408) - [@​smola](https://github.com/smola)) - β¨ Fix location for SSRF with Kong Unirest ([#​8407](DataDog/dd-trace-java#8407) - [@​smola](https://github.com/smola)) - β¨ Exclude IBM Instana from IAST ([#​8406](DataDog/dd-trace-java#8406) - [@​smola](https://github.com/smola)) - π Fix org.json iast instrumentation test for latest dependency ([#​8347](DataDog/dd-trace-java#8347) - [@​jandro996](https://github.com/jandro996)) - β¨ Configuration to Disable APM Tracing ([#​8219](DataDog/dd-trace-java#8219) - [@​jandro996](https://github.com/jandro996)) - β¨ Address cookie vulnerability cardinality issues ([#​8210](DataDog/dd-trace-java#8210) - [@​jandro996](https://github.com/jandro996)) - β¨ Email HTML Injection detection in IAST ([#​8205](DataDog/dd-trace-java#8205) - [@​sezen-datadog](https://github.com/sezen-datadog)) ##### Application Security Management (WAF) - πβ¨ Ensure usr.exists tag is not overridden when UsernameNotFoundException is thrown ([#​8376](DataDog/dd-trace-java#8376) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - πβ¨ Ensure usr.exists tag is not overridden by auto instrumentation ([#​8374](DataDog/dd-trace-java#8374) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - β¨ Update appsec metrics with event_rules_version tag ([#​8354](DataDog/dd-trace-java#8354) - [@​sezen-datadog](https://github.com/sezen-datadog)) - β¨ Update metrics: appsec.waf.requests ([#​8353](DataDog/dd-trace-java#8353) - [@​Mariovido](https://github.com/Mariovido)) - β¨ Improve ASM support in vert.x 5.0 ([#​8285](DataDog/dd-trace-java#8285) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - β¨ Update metrics: appsec.waf.updates and appsec.waf.init ([#​8280](DataDog/dd-trace-java#8280) - [@​Mariovido](https://github.com/Mariovido)) - β¨ Configuration to Disable APM Tracing ([#​8219](DataDog/dd-trace-java#8219) - [@​jandro996](https://github.com/jandro996)) ##### Build & Tooling - π Do not generate Muzzle references for primitive arrays in method body ([#​8361](DataDog/dd-trace-java#8361) - [@​amarziali](https://github.com/amarziali)) - π Improve dev env setup documentation for Windows ([#​8180](DataDog/dd-trace-java#8180) - [@​lucaspimentel](https://github.com/lucaspimentel)) ##### Continuous Integration Visibility - β¨ Add support for skip-EFD tagging ([#​8487](DataDog/dd-trace-java#8487) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - π Fix an NPE in Gradle Android instrumentation ([#​8484](DataDog/dd-trace-java#8484) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - β¨ Consider modified tests when applying fail-fast tests ordering ([#​8474](DataDog/dd-trace-java#8474) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - β¨ Implement tests reordering for TestNG ([#​8467](DataDog/dd-trace-java#8467) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - π Fix Gradle Launcher instrumentation to not interfere with Gradle Test Kit ([#​8465](DataDog/dd-trace-java#8465) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - π§Ή Use separate TestEventHandlers per framework in CI Vis instrumentations ([#​8451](DataDog/dd-trace-java#8451) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - β¨ Remove warning log when JUnit 4 test method cannot be retrieved ([#​8445](DataDog/dd-trace-java#8445) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - π Fix Scalatest tracing for tests that are reported asynchronously ([#​8444](DataDog/dd-trace-java#8444) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - β¨ Implement attempt to fix tests ([#​8393](DataDog/dd-trace-java#8393) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - β¨ Implement test disabling ([#​8377](DataDog/dd-trace-java#8377) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - β¨ Update CODEOWNERS parser to not log errors on comments with leading whitespace ([#​8349](DataDog/dd-trace-java#8349) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - β¨ Request Test Management tests list ([#​8345](DataDog/dd-trace-java#8345) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - β¨ Receive test management settings from CIVis settings request ([#​8331](DataDog/dd-trace-java#8331) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - β¨ Implement quarantined tests tagging ([#​8326](DataDog/dd-trace-java#8326) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - β¨ Implement tests quarantining ([#​8320](DataDog/dd-trace-java#8320) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - β¨ Add tag to specify if the user is setting DD_SERVICE ([#​8318](DataDog/dd-trace-java#8318) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) ##### Crash tracking - β¨ Only fork jps when required ([#​8419](DataDog/dd-trace-java#8419) - [@​mcculls](https://github.com/mcculls)) - π Use Java home of the crashed process to launch crash uploader ([#​8348](DataDog/dd-trace-java#8348) - [@​jbachorik](https://github.com/jbachorik)) ##### Data Streams Monitoring - π Fix error happening when sqs message attributes are readonly ([#​8473](DataDog/dd-trace-java#8473) - [@​vandonr](https://github.com/vandonr)) - π Fix bug on proto schema extraction ([#​8403](DataDog/dd-trace-java#8403) - [@​vandonr](https://github.com/vandonr)) - π Fix service name overrides in consumers ([#​8387](DataDog/dd-trace-java#8387) - [@​piochelepiotr](https://github.com/piochelepiotr)) ##### Database Monitoring - β¨ Add DBMTracePreparedStatements to tracer configuration log ([#​8508](DataDog/dd-trace-java#8508) - [@​cecile75](https://github.com/cecile75)) ##### Dynamic Instrumentation - β¨ Look in another location for grpc service methods ([#​8468](DataDog/dd-trace-java#8468) - [@​evanchooly](https://github.com/evanchooly)) - π Fix Exception Replay with Lambda proxy classes ([#​8452](DataDog/dd-trace-java#8452) - [@​jpbempel](https://github.com/jpbempel)) - β¨ Add code origin support for spring-webmvc ([#​8416](DataDog/dd-trace-java#8416) - [@​evanchooly](https://github.com/evanchooly)) - β¨ Add support for scanning jar from loaded class ([#​8370](DataDog/dd-trace-java#8370) - [@​jpbempel](https://github.com/jpbempel)) - π Disable capture of entry values ([#​8369](DataDog/dd-trace-java#8369) - [@​jpbempel](https://github.com/jpbempel)) - π Fix CodeOrigin for `@Trace` annotation ([#​8344](DataDog/dd-trace-java#8344) - [@​jpbempel](https://github.com/jpbempel)) - π Fix equals/hashCode for CodeOrigin probe ([#​8319](DataDog/dd-trace-java#8319) - [@​jpbempel](https://github.com/jpbempel)) - β¨ Add code origin support to kafka message listeners ([#​8301](DataDog/dd-trace-java#8301) - [@​evanchooly](https://github.com/evanchooly)) ##### Metrics - β¨ Create metric: appsec.waf.error ([#​8381](DataDog/dd-trace-java#8381) - [@​sezen-datadog](https://github.com/sezen-datadog)) - β¨ Create metric: appsec.rasp.error ([#​8364](DataDog/dd-trace-java#8364) - [@​sezen-datadog](https://github.com/sezen-datadog)) ##### Profiling - β¨ Bump ddprof library to 1.22.0 ([#​8463](DataDog/dd-trace-java#8463) - [@​jbachorik](https://github.com/jbachorik)) - IBM J9 8u361 corresponds to OpenJDK 8u362 by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#187 - Fix compatibility with musl libc 1.2.4 by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#189 - Modify version extraction by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#179 - Do not write null values to jvminfo event by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#184 - Productize VMStructs-based stack walker by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#177 - A few minor downport issues by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#180 - Enable ASGCT by default on fairly safe J9 JDK versions by [@​jbachorik](https://github.com/jbachorik) in DataDog/java-profiler#181 - π Exclude OrderedThreadPoolExecutor from queue-time measurements ([#​8456](DataDog/dd-trace-java#8456) - [@​jbachorik](https://github.com/jbachorik)) - β¨ Record JVM info on JVMs without JFR ([#​8431](DataDog/dd-trace-java#8431) - [@​jbachorik](https://github.com/jbachorik)) - π Actually use CleanupTask in TempLocationManager ([#​8420](DataDog/dd-trace-java#8420) - [@​mcculls](https://github.com/mcculls)) - β¨ Only fork jps when required ([#​8419](DataDog/dd-trace-java#8419) - [@​mcculls](https://github.com/mcculls)) - π Adjust JFR checks for J9 ([#​8405](DataDog/dd-trace-java#8405) - [@​jbachorik](https://github.com/jbachorik)) - π§Ή Disable smap RSS parsing by default ([#​8342](DataDog/dd-trace-java#8342) - [@​MattAlp](https://github.com/MattAlp)) ##### Telemetry - π Add support for JBoss jar:file format to DependencyResolver ([#​8428](DataDog/dd-trace-java#8428) - [@​jandro996](https://github.com/jandro996)) - β¨ Update metrics: appsec.waf.requests ([#​8353](DataDog/dd-trace-java#8353) - [@​Mariovido](https://github.com/Mariovido)) ##### Trace context propagation - β¨ Introduce tracing propagator ([#​8313](DataDog/dd-trace-java#8313) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) ##### Tracer core - π Fix Stable Config telemetry source names ([#​8460](DataDog/dd-trace-java#8460) - [@​BaptisteFoy](https://github.com/BaptisteFoy)) - β¨ Probe trace endpoints with a valid payload of empty arrays ([#​8414](DataDog/dd-trace-java#8414) - [@​mcculls](https://github.com/mcculls)) - β¨ Add 1 minute fail-safe to JUL/JMX class-loading callback ([#​8399](DataDog/dd-trace-java#8399) - [@​mcculls](https://github.com/mcculls)) - β¨ Migrate DSM injection calls to context-first APIs ([#​8383](DataDog/dd-trace-java#8383) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - π§Ή Move continuation capture methods from scope to tracer ([#​8371](DataDog/dd-trace-java#8371) - [@​mcculls](https://github.com/mcculls)) - β¨ Migrate context extraction calls to context-first APIs ([#​8368](DataDog/dd-trace-java#8368) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - π§Ή Migrate context injection calls to context-first APIs ([#​8358](DataDog/dd-trace-java#8358) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - π‘ Support reading configurations from files ([#​8338](DataDog/dd-trace-java#8338) - [@​mtoffl01](https://github.com/mtoffl01)) - π‘ Implementation of BaggagePropagator and BaggageContext ([#​8330](DataDog/dd-trace-java#8330) - [@​mhlidd](https://github.com/mhlidd)) - π§Ή Combine continuation implementations into one which supports multiple activations ([#​8324](DataDog/dd-trace-java#8324) - [@​mcculls](https://github.com/mcculls)) - β¨ Introduce tracing propagator ([#​8313](DataDog/dd-trace-java#8313) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - β¨ Remove old context propagation API ([#​8271](DataDog/dd-trace-java#8271) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) ##### Instrumentations ##### AWS Lambda instrumentation - π Send error message and stack to Lambda extension ([#​8417](DataDog/dd-trace-java#8417) - [@​nhulston](https://github.com/nhulston)) ##### AWS SDK instrumentation - π Fix error happening when sqs message attributes are readonly ([#​8473](DataDog/dd-trace-java#8473) - [@​vandonr](https://github.com/vandonr)) - π‘ Inject trace context into AWS Step Functions input ([#​7585](DataDog/dd-trace-java#7585) - [@​DylanLovesCoffee](https://github.com/DylanLovesCoffee)) ##### Core Java language instrumentation - β¨ Look in another location for grpc service methods ([#​8468](DataDog/dd-trace-java#8468) - [@​evanchooly](https://github.com/evanchooly)) - β¨ Add code origin support for spring-webmvc ([#​8416](DataDog/dd-trace-java#8416) - [@​evanchooly](https://github.com/evanchooly)) - π‘ Implementation of BaggagePropagator and BaggageContext ([#​8330](DataDog/dd-trace-java#8330) - [@​mhlidd](https://github.com/mhlidd)) - β¨ Add code origin support to kafka message listeners ([#​8301](DataDog/dd-trace-java#8301) - [@​evanchooly](https://github.com/evanchooly)) ##### gRPC instrumentation - β¨ Look in another location for grpc service methods ([#​8468](DataDog/dd-trace-java#8468) - [@​evanchooly](https://github.com/evanchooly)) ##### Kafka instrumentation - β¨ Add messaging.destination.name tag to kafka integrations ([#​8366](DataDog/dd-trace-java#8366) - [@​rarguelloF](https://github.com/rarguelloF)) ##### Protocol Buffer instrumentation - π Fix bug on proto schema extraction ([#​8403](DataDog/dd-trace-java#8403) - [@​vandonr](https://github.com/vandonr)) </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: 108a0f86aa59ab4c938cbac0688dd4c19cb301fa
What Does This Do
Adds an instrumentation for AWS SDK Step Functions. This enables tracing for when a Lambda function invokes a Step Function. Trace context is injected into the Step Function's
StartExecutionRequest/StartSyncExecutionRequest.Input
object.Example of traced step function in the Serverless org: app
The Logs to Traces Reducer will read the trace context from the Step Function logs and create a span for the Step Function.
Motivation
Continues the work done in Python and NodeJS.
Additional Notes
Screenshots of feature:



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-5249](https://datadoghq.atlassian.net/browse/SVLS-5249)