-
Notifications
You must be signed in to change notification settings - Fork 293
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
Create S3 instrumentation + add span pointers #8075
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 61 metrics, 2 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~218c106e88, baseline=1.46.0-SNAPSHOT~1f71dbd1b1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1055308
Total [baseline] (10.475 s) : 0, 10475055
Agent [candidate] (1.054 s) : 0, 1053800
Total [candidate] (10.41 s) : 0, 10409841
section appsec
Agent [baseline] (1.187 s) : 0, 1186885
Total [baseline] (10.702 s) : 0, 10701687
Agent [candidate] (1.188 s) : 0, 1187954
Total [candidate] (10.755 s) : 0, 10755459
section iast
Agent [baseline] (1.193 s) : 0, 1193338
Total [baseline] (10.97 s) : 0, 10969775
Agent [candidate] (1.184 s) : 0, 1184359
Total [candidate] (10.974 s) : 0, 10973562
section profiling
Agent [baseline] (1.254 s) : 0, 1254433
Total [baseline] (10.771 s) : 0, 10771015
Agent [candidate] (1.252 s) : 0, 1251618
Total [candidate] (10.784 s) : 0, 10784462
gantt
title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~218c106e88, baseline=1.46.0-SNAPSHOT~1f71dbd1b1
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.664 ms) : 0, 713664
BytebuddyAgent [candidate] (714.0 ms) : 0, 714000
GlobalTracer [baseline] (255.49 ms) : 0, 255490
GlobalTracer [candidate] (255.72 ms) : 0, 255720
AppSec [baseline] (55.467 ms) : 0, 55467
AppSec [candidate] (56.265 ms) : 0, 56265
Remote Config [baseline] (733.656 µs) : 0, 734
Remote Config [candidate] (736.364 µs) : 0, 736
Telemetry [baseline] (15.049 ms) : 0, 15049
Telemetry [candidate] (12.103 ms) : 0, 12103
section appsec
BytebuddyAgent [baseline] (729.937 ms) : 0, 729937
BytebuddyAgent [candidate] (730.368 ms) : 0, 730368
GlobalTracer [baseline] (252.775 ms) : 0, 252775
GlobalTracer [candidate] (253.078 ms) : 0, 253078
AppSec [baseline] (170.725 ms) : 0, 170725
AppSec [candidate] (170.944 ms) : 0, 170944
Remote Config [baseline] (667.387 µs) : 0, 667
Remote Config [candidate] (666.766 µs) : 0, 667
Telemetry [baseline] (8.174 ms) : 0, 8174
Telemetry [candidate] (8.174 ms) : 0, 8174
IAST [baseline] (19.258 ms) : 0, 19258
IAST [candidate] (19.417 ms) : 0, 19417
section iast
BytebuddyAgent [baseline] (840.023 ms) : 0, 840023
BytebuddyAgent [candidate] (832.653 ms) : 0, 832653
GlobalTracer [baseline] (248.476 ms) : 0, 248476
GlobalTracer [candidate] (247.413 ms) : 0, 247413
AppSec [baseline] (58.517 ms) : 0, 58517
AppSec [candidate] (58.137 ms) : 0, 58137
Remote Config [baseline] (686.799 µs) : 0, 687
Remote Config [candidate] (672.99 µs) : 0, 673
Telemetry [baseline] (8.849 ms) : 0, 8849
Telemetry [candidate] (8.772 ms) : 0, 8772
IAST [baseline] (21.726 ms) : 0, 21726
IAST [candidate] (21.686 ms) : 0, 21686
section profiling
ProfilingAgent [baseline] (94.923 ms) : 0, 94923
ProfilingAgent [candidate] (94.726 ms) : 0, 94726
BytebuddyAgent [baseline] (703.674 ms) : 0, 703674
BytebuddyAgent [candidate] (702.858 ms) : 0, 702858
GlobalTracer [baseline] (349.382 ms) : 0, 349382
GlobalTracer [candidate] (348.708 ms) : 0, 348708
AppSec [baseline] (55.023 ms) : 0, 55023
AppSec [candidate] (53.874 ms) : 0, 53874
Remote Config [baseline] (726.166 µs) : 0, 726
Remote Config [candidate] (725.197 µs) : 0, 725
Telemetry [baseline] (8.8 ms) : 0, 8800
Telemetry [candidate] (8.75 ms) : 0, 8750
Profiling [baseline] (94.947 ms) : 0, 94947
Profiling [candidate] (94.75 ms) : 0, 94750
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~218c106e88, baseline=1.46.0-SNAPSHOT~1f71dbd1b1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1055011
Total [baseline] (8.655 s) : 0, 8655355
Agent [candidate] (1.062 s) : 0, 1062178
Total [candidate] (8.638 s) : 0, 8637657
section iast
Agent [baseline] (1.186 s) : 0, 1186455
Total [baseline] (9.189 s) : 0, 9189206
Agent [candidate] (1.192 s) : 0, 1191907
Total [candidate] (9.21 s) : 0, 9209992
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.184 s) : 0, 1183737
Total [baseline] (9.18 s) : 0, 9180201
Agent [candidate] (1.181 s) : 0, 1180710
Total [candidate] (9.167 s) : 0, 9167207
section iast_TELEMETRY_OFF
Agent [baseline] (1.184 s) : 0, 1184268
Total [baseline] (9.187 s) : 0, 9186881
Agent [candidate] (1.18 s) : 0, 1179628
Total [candidate] (9.198 s) : 0, 9198219
gantt
title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~218c106e88, baseline=1.46.0-SNAPSHOT~1f71dbd1b1
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.109 ms) : 0, 714109
BytebuddyAgent [candidate] (717.868 ms) : 0, 717868
GlobalTracer [baseline] (255.178 ms) : 0, 255178
GlobalTracer [candidate] (257.379 ms) : 0, 257379
AppSec [baseline] (56.248 ms) : 0, 56248
AppSec [candidate] (55.857 ms) : 0, 55857
Remote Config [baseline] (733.083 µs) : 0, 733
Remote Config [candidate] (742.187 µs) : 0, 742
Telemetry [baseline] (13.763 ms) : 0, 13763
Telemetry [candidate] (15.275 ms) : 0, 15275
section iast
BytebuddyAgent [baseline] (834.642 ms) : 0, 834642
BytebuddyAgent [candidate] (838.909 ms) : 0, 838909
GlobalTracer [baseline] (247.58 ms) : 0, 247580
GlobalTracer [candidate] (248.335 ms) : 0, 248335
AppSec [baseline] (58.171 ms) : 0, 58171
AppSec [candidate] (58.564 ms) : 0, 58564
IAST [baseline] (21.562 ms) : 0, 21562
IAST [candidate] (21.532 ms) : 0, 21532
Remote Config [baseline] (660.145 µs) : 0, 660
Remote Config [candidate] (661.3 µs) : 0, 661
Telemetry [baseline] (8.847 ms) : 0, 8847
Telemetry [candidate] (8.78 ms) : 0, 8780
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (832.26 ms) : 0, 832260
BytebuddyAgent [candidate] (830.152 ms) : 0, 830152
GlobalTracer [baseline] (247.101 ms) : 0, 247101
GlobalTracer [candidate] (246.499 ms) : 0, 246499
AppSec [baseline] (58.122 ms) : 0, 58122
AppSec [candidate] (58.03 ms) : 0, 58030
IAST [baseline] (21.588 ms) : 0, 21588
IAST [candidate] (21.596 ms) : 0, 21596
Remote Config [baseline] (666.77 µs) : 0, 667
Remote Config [candidate] (674.449 µs) : 0, 674
Telemetry [baseline] (8.914 ms) : 0, 8914
Telemetry [candidate] (8.807 ms) : 0, 8807
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (834.326 ms) : 0, 834326
BytebuddyAgent [candidate] (829.491 ms) : 0, 829491
GlobalTracer [baseline] (246.477 ms) : 0, 246477
GlobalTracer [candidate] (246.914 ms) : 0, 246914
AppSec [baseline] (58.127 ms) : 0, 58127
AppSec [candidate] (57.712 ms) : 0, 57712
IAST [baseline] (20.901 ms) : 0, 20901
IAST [candidate] (21.066 ms) : 0, 21066
Remote Config [baseline] (667.158 µs) : 0, 667
Remote Config [candidate] (663.363 µs) : 0, 663
Telemetry [baseline] (8.684 ms) : 0, 8684
Telemetry [candidate] (8.709 ms) : 0, 8709
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~218c106e88, baseline=1.46.0-SNAPSHOT~1f71dbd1b1
dateFormat X
axisFormat %s
section baseline
no_agent (378.644 µs) : 359, 398
. : milestone, 379,
iast (505.524 µs) : 484, 527
. : milestone, 506,
iast_FULL (736.807 µs) : 715, 759
. : milestone, 737,
iast_GLOBAL (556.328 µs) : 533, 579
. : milestone, 556,
iast_HARDCODED_SECRET_DISABLED (500.064 µs) : 478, 522
. : milestone, 500,
iast_INACTIVE (457.164 µs) : 435, 479
. : milestone, 457,
iast_TELEMETRY_OFF (484.889 µs) : 463, 506
. : milestone, 485,
tracing (448.821 µs) : 428, 470
. : milestone, 449,
section candidate
no_agent (380.954 µs) : 360, 401
. : milestone, 381,
iast (499.746 µs) : 478, 521
. : milestone, 500,
iast_FULL (738.981 µs) : 717, 761
. : milestone, 739,
iast_GLOBAL (544.944 µs) : 523, 567
. : milestone, 545,
iast_HARDCODED_SECRET_DISABLED (503.124 µs) : 481, 525
. : milestone, 503,
iast_INACTIVE (450.726 µs) : 430, 472
. : milestone, 451,
iast_TELEMETRY_OFF (485.835 µs) : 464, 507
. : milestone, 486,
tracing (455.523 µs) : 434, 477
. : milestone, 456,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~218c106e88, baseline=1.46.0-SNAPSHOT~1f71dbd1b1
dateFormat X
axisFormat %s
section baseline
no_agent (1.344 ms) : 1325, 1364
. : milestone, 1344,
appsec (1.749 ms) : 1726, 1772
. : milestone, 1749,
appsec_no_iast (1.721 ms) : 1695, 1747
. : milestone, 1721,
iast (1.517 ms) : 1492, 1542
. : milestone, 1517,
profiling (1.498 ms) : 1472, 1524
. : milestone, 1498,
tracing (1.495 ms) : 1471, 1519
. : milestone, 1495,
section candidate
no_agent (1.363 ms) : 1344, 1383
. : milestone, 1363,
appsec (1.725 ms) : 1701, 1749
. : milestone, 1725,
appsec_no_iast (1.751 ms) : 1726, 1776
. : milestone, 1751,
iast (1.51 ms) : 1485, 1534
. : milestone, 1510,
profiling (1.518 ms) : 1495, 1541
. : milestone, 1518,
tracing (1.473 ms) : 1448, 1498
. : milestone, 1473,
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.46.0-SNAPSHOT~218c106e88, baseline=1.46.0-SNAPSHOT~1f71dbd1b1
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1465, 1488
. : milestone, 1477,
appsec (2.38 ms) : 2337, 2423
. : milestone, 2380,
iast (2.117 ms) : 2063, 2172
. : milestone, 2117,
iast_GLOBAL (2.159 ms) : 2104, 2214
. : milestone, 2159,
profiling (1.989 ms) : 1945, 2034
. : milestone, 1989,
tracing (1.956 ms) : 1914, 1997
. : milestone, 1956,
section candidate
no_agent (1.477 ms) : 1465, 1488
. : milestone, 1477,
appsec (2.371 ms) : 2328, 2414
. : milestone, 2371,
iast (2.108 ms) : 2054, 2162
. : milestone, 2108,
iast_GLOBAL (2.163 ms) : 2108, 2217
. : milestone, 2163,
profiling (1.973 ms) : 1929, 2016
. : milestone, 1973,
tracing (1.962 ms) : 1920, 2004
. : milestone, 1962,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~218c106e88, baseline=1.46.0-SNAPSHOT~1f71dbd1b1
dateFormat X
axisFormat %s
section baseline
no_agent (14.931 s) : 14931000, 14931000
. : milestone, 14931000,
appsec (15.095 s) : 15095000, 15095000
. : milestone, 15095000,
iast (19.011 s) : 19011000, 19011000
. : milestone, 19011000,
iast_GLOBAL (17.777 s) : 17777000, 17777000
. : milestone, 17777000,
profiling (15.335 s) : 15335000, 15335000
. : milestone, 15335000,
tracing (15.022 s) : 15022000, 15022000
. : milestone, 15022000,
section candidate
no_agent (15.483 s) : 15483000, 15483000
. : milestone, 15483000,
appsec (14.78 s) : 14780000, 14780000
. : milestone, 14780000,
iast (18.682 s) : 18682000, 18682000
. : milestone, 18682000,
iast_GLOBAL (18.001 s) : 18001000, 18001000
. : milestone, 18001000,
profiling (14.965 s) : 14965000, 14965000
. : milestone, 14965000,
tracing (15.072 s) : 15072000, 15072000
. : milestone, 15072000,
|
bf87219
to
49a2179
Compare
AgentTracer.NoopContext zeroContext = AgentTracer.NoopContext.INSTANCE; | ||
span.addLink(SpanLink.from(zeroContext, AgentSpanLink.DEFAULT_FLAGS, "", attributes)); |
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 we can't pass trace context, we use our attributes (specifically ptr.hash) to link the two traces, and we just use a trace context with values of zero for the trace/span id.
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.
@mhlidd Another case where span link can have an invalid span context 😉
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.
Few comments as preliminary review.
You might want another pair of eyes from the IDM team 😉
...va-s3-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/s3/S3ClientInstrumentation.java
Outdated
Show resolved
Hide resolved
...ion/aws-java-s3-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/s3/S3Interceptor.java
Outdated
Show resolved
Hide resolved
…s' into nicholas.hulston/s3-span-pointers
...p/src/main/java/datadog/trace/bootstrap/instrumentation/spanpointers/SpanPointersHelper.java
Outdated
Show resolved
Hide resolved
...ion/aws-java-s3-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/s3/S3Interceptor.java
Outdated
Show resolved
Hide resolved
...ion/aws-java-s3-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/s3/S3Interceptor.java
Outdated
Show resolved
Hide resolved
I believe test failure is unrelated to changes: |
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.
the span pointer logic seems fine. will leave the java details to our java experts, though.
...ion/aws-java-s3-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/s3/S3Interceptor.java
Outdated
Show resolved
Hide resolved
@@ -165,6 +165,7 @@ public final class TraceInstrumentationConfig { | |||
public static final String AXIS_PROMOTE_RESOURCE_NAME = "trace.axis.promote.resource-name"; | |||
|
|||
public static final String SQS_BODY_PROPAGATION_ENABLED = "trace.sqs.body.propagation.enabled"; | |||
public static final String ADD_SPAN_POINTERS = "aws.add.span.pointers"; |
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'm happy to change this env var if the APM team has any opinions (cc @amarziali)
- The equivalent env var in Python is
DD_BOTOCORE_ADD_SPAN_POINTERS
, so I'm trying to follow convention - This env var will be used on span pointers for both S3 and DynamoDB, so I added the
_AWS
in the name. Also, span pointers can be customized in custom instrumentations by users, so I want to specify that this env var just stops span pointers for our AWS instrumentations in S3+DynamoDB. This env var doesn't disable the option for custom span pointers
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 think the choice of the name is ok. Would you mind prefixing by trace.
as others are?
dd-trace-core/src/main/java/datadog/trace/core/tagprocessor/SpanPointersProcessor.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/tagprocessor/SpanPointersProcessor.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/tagprocessor/SpanPointersProcessor.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.
LGTM. I added a small refactoring and fixed few tests. Can you please mention how to disable the feature in the PR description? Please feel free to merge afterwards
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `2.25.4` -> `2.26.0` | | [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.45.2` -> `1.46.0` | | [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.45.2` -> `1.46.0` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | --- ### Release Notes <details> <summary>googleapis/java-datastore (com.google.cloud:google-cloud-datastore)</summary> ### [`v2.26.0`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#2260-2025-01-29) ##### Features - Add firestoreInDatastoreMode for datastore emulator ([#​1698](googleapis/java-datastore#1698)) ([50f106d](googleapis/java-datastore@50f106d)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.42.0 ([#​1725](googleapis/java-datastore#1725)) ([1cbaf22](googleapis/java-datastore@1cbaf22)) </details> <details> <summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary> ### [`v1.46.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.46.0): 1.46.0 ##### Breaking Changes > \[!WARNING] > jnr-unixsocket is now an external dependency of dd-trace-ot and must be included when deploying dd-trace-ot. > \[!NOTE] > The API `TracerScope.setAsync(boolean)`, used to manually control asynchronous span propagation, does no more apply to the scope instance but to the active span scope. ##### Components ##### Application Security Management (IAST) - 🐛 Fix String.replace instrumentation for IAST ([#​8281](DataDog/dd-trace-java#8281) - [@​Mariovido](https://github.com/Mariovido)) - ✨ Apply the standard nomenclature to the stacktrace configs ([#​8244](DataDog/dd-trace-java#8244) - [@​jandro996](https://github.com/jandro996)) - 🐛 Exclude false positive weak randomness ([#​8232](DataDog/dd-trace-java#8232) - [@​jandro996](https://github.com/jandro996)) - ✨ Propagation of translateEscapes of String class ([#​8186](DataDog/dd-trace-java#8186) - [@​sezen-datadog](https://github.com/sezen-datadog)) - ✨ Add security control metrics ([#​8175](DataDog/dd-trace-java#8175) - [@​jandro996](https://github.com/jandro996)) - ✨ Increase IAST propagation to StringBuffer setLength ([#​8128](DataDog/dd-trace-java#8128) - [@​Mariovido](https://github.com/Mariovido)) - ✨ Add IAST taint tracking for DB values ([#​8072](DataDog/dd-trace-java#8072) - [@​Mariovido](https://github.com/Mariovido)) ##### Application Security Management (WAF) - 🐛 Prevents a NPE when there is no subscriber for user events ([#​8258](DataDog/dd-trace-java#8258) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Apply the standard nomenclature to the stacktrace configs ([#​8244](DataDog/dd-trace-java#8244) - [@​jandro996](https://github.com/jandro996)) - 🐛 Ensure cached subscriptions are cleared on reconfiguration via RC ([#​8229](DataDog/dd-trace-java#8229) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Add support for session tracking in Vertx ([#​8167](DataDog/dd-trace-java#8167) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Create span tag: \_dd.appsec.rasp.timeout ([#​8269](DataDog/dd-trace-java#8269) - [@​Mariovido](https://github.com/Mariovido)) ##### Build & Tooling - 🐛 Ensure shaded helpers have unique names when injected into class-loaders ([#​8192](DataDog/dd-trace-java#8192) - [@​mcculls](https://github.com/mcculls)) ##### Configuration at Runtime - 🐛 Remove filtering of `DD_SERVICE` and `DD_ENV` from the tracer ([#​8176](DataDog/dd-trace-java#8176) - [@​mhlidd](https://github.com/mhlidd)) ##### Continuous Integration Visibility - 🧹 Generalize TestRetryPolicy to TestExecutionPolicy ([#​8302](DataDog/dd-trace-java#8302) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🧹 Parallelize CI Visibility settings requests ([#​8299](DataDog/dd-trace-java#8299) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🧹 Generalize test retry logic ([#​8289](DataDog/dd-trace-java#8289) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🧹 Generalize tests skipping logic ([#​8288](DataDog/dd-trace-java#8288) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🧹 Remove skip and shouldBeSkipped methods from TestEventsHandler in favor of isSkippable ([#​8286](DataDog/dd-trace-java#8286) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨⚡ Optimize Git repository information computation ([#​8270](DataDog/dd-trace-java#8270) - [@​dougqh](https://github.com/dougqh)) - ✨ Always request known tests from the backend ([#​8268](DataDog/dd-trace-java#8268) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Fix NPE when trying to get retry analyzer in Test NG ([#​8253](DataDog/dd-trace-java#8253) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Set test framework and test framework version tags atomically ([#​8252](DataDog/dd-trace-java#8252) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Add debug logging to Android Gradle module layout logic ([#​8251](DataDog/dd-trace-java#8251) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Fix source and destination folders computation for Android Gradle projects ([#​8190](DataDog/dd-trace-java#8190) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Add basic Scala Weaver sbt support ([#​8189](DataDog/dd-trace-java#8189) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - ✨ Implement impacted tests detection ([#​8188](DataDog/dd-trace-java#8188) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) ##### Data Streams Monitoring - ✨ Change hash computation for protobuf to better represent impacting changes + save proto number in schema ([#​8201](DataDog/dd-trace-java#8201) - [@​vandonr](https://github.com/vandonr)) ##### Database Monitoring - Add peer service tag in dbm sql commenter ([#​7913](DataDog/dd-trace-java#7913) - [@​jordan-wong](https://github.com/jordan-wong)) ##### Dynamic Instrumentation - ✨ Add support for SymDB to scan directories ([#​8306](DataDog/dd-trace-java#8306) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Add SymDB report for any jar scanning failures ([#​8300](DataDog/dd-trace-java#8300) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Use two budgets depending on type ([#​8283](DataDog/dd-trace-java#8283) - [@​evanchooly](https://github.com/evanchooly)) - ✨ Institute a 10 snapshot per probe per trace budget ([#​8277](DataDog/dd-trace-java#8277) - [@​evanchooly](https://github.com/evanchooly)) - 🐛 Avoid double snapshots for Exception Replay ([#​8273](DataDog/dd-trace-java#8273) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Simplify code origins. Separate out snapshot generation. ([#​8263](DataDog/dd-trace-java#8263) - [@​evanchooly](https://github.com/evanchooly)) - ✨ Add Exception probe custom instrumentation ([#​8230](DataDog/dd-trace-java#8230) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Enhance log probes to honor debug session tags ([#​8215](DataDog/dd-trace-java#8215) - [@​evanchooly](https://github.com/evanchooly)) - 🐛 Don't redact env tokens from debugger probe snapshots ([#​8211](DataDog/dd-trace-java#8211) - [@​watson](https://github.com/watson)) - ✨⚡ Move Trace/SpanId capture at commit time ([#​8184](DataDog/dd-trace-java#8184) - [@​jpbempel](https://github.com/jpbempel)) - 🐛 Capture values at entry for method probe ([#​8169](DataDog/dd-trace-java#8169) - [@​jpbempel](https://github.com/jpbempel)) ##### JMX fetch - 🐛 Mute JMXFetch Shutdown in progress error ([#​8068](DataDog/dd-trace-java#8068) - [@​ygree](https://github.com/ygree)) ##### OpenTracing -⚠️ 🧹 Make jnr-unixsocket an explicit dependency of dd-trace-ot ([#​8307](DataDog/dd-trace-java#8307) - [@​mcculls](https://github.com/mcculls)) ##### Profiling - 🐛 Avoid unsupported API call for creating folders on windows ([#​8304](DataDog/dd-trace-java#8304) - [@​jbachorik](https://github.com/jbachorik)) - ✨ Tag profiles for serverless ([#​8279](DataDog/dd-trace-java#8279) - [@​jbachorik](https://github.com/jbachorik)) - ✨ add queue type and length to queue events ([#​8242](DataDog/dd-trace-java#8242) - [@​richardstartin](https://github.com/richardstartin)) - 🐛 TempLocationManager Fixes and Improvements ([#​8191](DataDog/dd-trace-java#8191) - [@​jbachorik](https://github.com/jbachorik)) - ✨ Bump ddprof to 1.18.0 ([#​8173](DataDog/dd-trace-java#8173) - [@​jbachorik](https://github.com/jbachorik)) - ✨ Report profiler initialization and configuration errors to telemetry ([#​8171](DataDog/dd-trace-java#8171) - [@​jbachorik](https://github.com/jbachorik)) ##### Telemetry - ✨ Add pending traces report in tracer flares ([#​8053](DataDog/dd-trace-java#8053) - [@​mhlidd](https://github.com/mhlidd)) ##### Testing - ✨ Test http server requests in parallel ([#​8222](DataDog/dd-trace-java#8222) - [@​amarziali](https://github.com/amarziali)) ##### Trace context propagation - ✨ Add non default propagator registration ([#​8310](DataDog/dd-trace-java#8310) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) ##### Tracer core - ✨ Probe for existence of IBMSASL or ACCP security providers ([#​8276](DataDog/dd-trace-java#8276) - [@​mcculls](https://github.com/mcculls)) - ✨⚡ Overhead improvement to agent feedback based sampling ([#​8265](DataDog/dd-trace-java#8265) - [@​dougqh](https://github.com/dougqh)) - 🧹 Move async propagation API from scope to tracer ([#​8231](DataDog/dd-trace-java#8231) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨ Introduce context propagation API ([#​8161](DataDog/dd-trace-java#8161) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨🧪 Use env-entry to add tags per webapp deployment ([#​8138](DataDog/dd-trace-java#8138) - [@​amarziali](https://github.com/amarziali)) - ✨ Introduce context helpers API ([#​8134](DataDog/dd-trace-java#8134) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨ Support IPv6 values for `DD_AGENT_HOST` and `DD_TRACE_AGENT_URL` ([#​7984](DataDog/dd-trace-java#7984) - [@​mhlidd](https://github.com/mhlidd)) ##### Instrumentations ##### Apache HttpComponents - 🐛 Properly finish spans and support latest apache httpclient5 ([#​8272](DataDog/dd-trace-java#8272) - [@​amarziali](https://github.com/amarziali)) ##### AWS Lambda instrumentation - 🐛 Properly capture lambda payloads for all handler types. ([#​8264](DataDog/dd-trace-java#8264) - [@​purple4reina](https://github.com/purple4reina)) ##### AWS S3 instrumentation - 💡 Create S3 instrumentation + add span pointers ([#​8075](DataDog/dd-trace-java#8075) - [@​nhulston](https://github.com/nhulston)) ##### AWS SDK instrumentation - 🐛 Revert "Add avoid double instrumenting lambda non-streaming handlers." ([#​8247](DataDog/dd-trace-java#8247) - [@​nhulston](https://github.com/nhulston)) ##### Cassandra - ✨ Allow extracting keyspace from statement result ([#​8239](DataDog/dd-trace-java#8239) - [@​amarziali](https://github.com/amarziali)) ##### Core Java language instrumentation - ✨ Propagation of translateEscapes of String class ([#​8186](DataDog/dd-trace-java#8186) - [@​sezen-datadog](https://github.com/sezen-datadog)) ##### Eclipse Vert.x instrumentation - 🐛 Fix vertx worker propagation and error handling ([#​8237](DataDog/dd-trace-java#8237) - [@​amarziali](https://github.com/amarziali)) - ✨ Support vertx 5 ([#​8220](DataDog/dd-trace-java#8220) - [@​amarziali](https://github.com/amarziali)) - ✨ Add support for session tracking in Vertx ([#​8167](DataDog/dd-trace-java#8167) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) ##### Kafka instrumentation - 🐛 Prevent possible NPE calculating Kafka record header size ([#​8292](DataDog/dd-trace-java#8292) - [@​ygree](https://github.com/ygree)) ##### Mule instrumentation - 🐛 Fix crash using Mule with JPMS ([#​8187](DataDog/dd-trace-java#8187) - [@​amarziali](https://github.com/amarziali)) ##### Protocol Buffer instrumentation - ✨ Change hash computation for protobuf to better represent impacting changes + save proto number in schema ([#​8201](DataDog/dd-trace-java#8201) - [@​vandonr](https://github.com/vandonr)) ##### Spring instrumentation - 🐛 Preserve getQualifier from spring scheduling runnables ([#​8293](DataDog/dd-trace-java#8293) - [@​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**: Whenever PR becomes conflicted, 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: bb09d47e4eed77a003f630273b4d0a84003eb899
What Does This Do
Creates an instrumentation for S3 and adds span pointers in S3 for
putObject
,copyObject
, andcompleteMultipartUpload
requests.Span pointers are similar to Span Links, but for cases when it is impossible to pass the Trace ID and Span ID between the spans that need to be linked.
When the calculated hashes for the upstream and downstream lambdas match, the Datadog backend will automatically link the two traces together.
When clicking on the linked span, a new tab opens linking to the downstream Lambda function that was triggered by this S3 object update.
This feature can be disabled by setting the config
trace.aws.add.span.pointers
or Lambda environment variableTRACE_AWS_ADD_SPAN_POINTERS
to false.Motivation
Span pointers is a new feature being developed by the Serverless team. This feature already exists in Python & Node, and I'm working on adding it to other runtimes (.NET, Java, Golang).
Testing Guidelines
Easy: Checkout this span, which is an upstream Lambda that makes all three S3 requests and triggers 3 separate downstream Lambda invocations. Therefore, the 3 span pointers should link to 3 different traces. Each downstream trace should point back to this span.
(Note: this trace might be from so long ago that the linked spans are no longer found, but just check that the span links themselves are created)
More thorough: Run this Lambda function (only on the serverless AWS account) with the event payload
and change one of the bools to true. Check Datadog to ensure that the spans are properly linked.
I also added tests:
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: SVLS-6060