Skip to content

Inject APM trace headers into SQS _datadog message attribute on send#10843

Draft
ygree wants to merge 6 commits intomasterfrom
ygree/sqs-inject-tracing-context
Draft

Inject APM trace headers into SQS _datadog message attribute on send#10843
ygree wants to merge 6 commits intomasterfrom
ygree/sqs-inject-tracing-context

Conversation

@ygree
Copy link
Contributor

@ygree ygree commented Mar 13, 2026

What Does This Do

Java's SQS instrumentation never wrote APM trace context (x-datadog-trace-id, x-datadog-parent-id) into the _datadog SQS message attribute on send. The receive side already knows how to read them, but the send side only injected the DSM pathway context — and only when Data Streams was enabled.

Motivation

This broke distributed tracing from Java to other language tracers (Python, Node.js, etc.) that rely on the _datadog attribute for context propagation.

Additional Notes

  • SqsInterceptor (v1 + v2): Call defaultPropagator().inject() before the DSM inject on SendMessage and SendMessageBatch, so APM trace headers are written into _datadog.
  • MessageAttributeInjector (v1 + v2): Accumulate multiple key-value pairs into the _datadog JSON blob instead of short-circuiting on the second call. Also guard against a null stringValue (Binary-typed _datadog attributes from SQS-JMS).
  • SqsClientInstrumentation (v1 + v2): Register SqsInterceptor when isSqsInjectDatadogAttributeEnabled() is true, not only when Data Streams is enabled.
  • Tests: Add "APM trace context is injected into _datadog message attribute on send" for both AWS SDK v1 and v2, covering both DSM-off (V0Test) and DSM-on (V0DataStreamsTest) variants.

DD context extraction was added in #5920

Contributor Checklist

Jira ticket: APMS-18847

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

ygree and others added 3 commits March 13, 2026 10:02
…attribute

Documents the missing send-side feature: Java never writes x-datadog-trace-id
or x-datadog-parent-id into _datadog, breaking Java→other-tracer propagation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously, the Java SQS instrumentation never wrote APM trace context
(x-datadog-trace-id, x-datadog-parent-id) into the _datadog message
attribute, breaking distributed tracing from Java to other language
tracers (Python, Node, etc.) that rely on that attribute.

Changes:
- SqsInterceptor (v1 + v2): call defaultPropagator().inject() before
  DSM inject so APM headers are written into _datadog on SendMessage
  and SendMessageBatch
- MessageAttributeInjector (v1 + v2): accumulate multiple key-value
  pairs into the _datadog JSON blob instead of short-circuiting on
  the second key
- SqsClientInstrumentation (v1 + v2): register SqsInterceptor when
  isSqsInjectDatadogAttributeEnabled() is true, not only when DSM is
  enabled, so APM injection works even without Data Streams
- Tests: add APM trace context injection test for both v1 and v2,
  covering DSM-on and DSM-off variants

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a message is sent with an existing _datadog attribute of Binary
type (e.g. from the SQS-JMS library), getStringValue() returns null.
Skip injection in that case rather than NPE.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ygree ygree requested a review from a team as a code owner March 13, 2026 19:46
@ygree ygree added type: bug Bug report and fix inst: aws sdk AWS SDK instrumentation tag: ai generated Largely based on code generated by an AI or LLM labels Mar 13, 2026
@ygree ygree requested a review from a team as a code owner March 13, 2026 19:46
@ygree ygree marked this pull request as draft March 13, 2026 19:51
@dougqh
Copy link
Contributor

dougqh commented Mar 13, 2026

I heard some suggestions that this was deliberate. Or at least, it was deliberate for baggage.
I really cannot think of reason why we'd inject for one transport but not another, so this looks good to me.

ygree and others added 2 commits March 13, 2026 13:06
DSM_CONCERN is registered with usedAsDefault=true, so defaultPropagator()
already includes DSM injection when Data Streams is enabled. The separate
dsmPropagator.inject() call was therefore always redundant: a no-op when
DSM is off, a duplicate when DSM is on.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SqsInterceptor: skip injection if _datadog is already present in the
message attributes. Appending to a caller-provided attribute could
produce duplicate JSON keys or corrupt propagation context set
intentionally upstream.

MessageAttributeInjector: add comments explaining why set() accumulates
into the existing _datadog value rather than overwriting — a single
propagator.inject() call fires set() once per header key, so all keys
(x-datadog-trace-id, x-datadog-parent-id, dd-pathway-ctx-base64, ...)
must land in the same JSON attribute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ygree
Copy link
Contributor Author

ygree commented Mar 13, 2026

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@ygree
Copy link
Contributor Author

ygree commented Mar 13, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad0d115b56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pr-commenter
Copy link

pr-commenter bot commented Mar 13, 2026

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master ygree/sqs-inject-tracing-context
git_commit_date 1772102129 1773440705
git_commit_sha 7f5d704 8f7f04c
release_version 1.60.0-SNAPSHOT~7f5d7043a9 1.60.0-SNAPSHOT~8f7f04ca71
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1773442691 1773442691
ci_job_id 1506132975 1506132975
ci_pipeline_id 102490902 102490902
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-yc2cak7w 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-yc2cak7w 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 12 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.60.0-SNAPSHOT~8f7f04ca71, baseline=1.60.0-SNAPSHOT~7f5d7043a9

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1062529
Total [baseline] (8.706 s) : 0, 8705708
Agent [candidate] (1.064 s) : 0, 1063723
Total [candidate] (8.76 s) : 0, 8760431
section iast
Agent [baseline] (1.233 s) : 0, 1232828
Total [baseline] (9.386 s) : 0, 9385687
Agent [candidate] (1.234 s) : 0, 1234074
Total [candidate] (9.384 s) : 0, 9383768
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.063 s -
Agent iast 1.233 s 170.3 ms (16.0%)
Total tracing 8.706 s -
Total iast 9.386 s 679.979 ms (7.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent iast 1.234 s 170.351 ms (16.0%)
Total tracing 8.76 s -
Total iast 9.384 s 623.337 ms (7.1%)
gantt
    title insecure-bank - break down per module: candidate=1.60.0-SNAPSHOT~8f7f04ca71, baseline=1.60.0-SNAPSHOT~7f5d7043a9

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.191 ms) : 0, 1191
crashtracking [candidate] (1.171 ms) : 0, 1171
BytebuddyAgent [baseline] (626.802 ms) : 0, 626802
BytebuddyAgent [candidate] (626.128 ms) : 0, 626128
AgentMeter [baseline] (28.941 ms) : 0, 28941
AgentMeter [candidate] (29.111 ms) : 0, 29111
GlobalTracer [baseline] (257.176 ms) : 0, 257176
GlobalTracer [candidate] (257.601 ms) : 0, 257601
AppSec [baseline] (33.031 ms) : 0, 33031
AppSec [candidate] (33.283 ms) : 0, 33283
Debugger [baseline] (62.851 ms) : 0, 62851
Debugger [candidate] (63.809 ms) : 0, 63809
Remote Config [baseline] (621.742 µs) : 0, 622
Remote Config [candidate] (622.24 µs) : 0, 622
Telemetry [baseline] (10.545 ms) : 0, 10545
Telemetry [candidate] (11.375 ms) : 0, 11375
Flare Poller [baseline] (5.325 ms) : 0, 5325
Flare Poller [candidate] (4.528 ms) : 0, 4528
section iast
crashtracking [baseline] (1.189 ms) : 0, 1189
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (797.448 ms) : 0, 797448
BytebuddyAgent [candidate] (799.618 ms) : 0, 799618
AgentMeter [baseline] (11.471 ms) : 0, 11471
AgentMeter [candidate] (11.476 ms) : 0, 11476
GlobalTracer [baseline] (247.095 ms) : 0, 247095
GlobalTracer [candidate] (246.692 ms) : 0, 246692
IAST [baseline] (27.291 ms) : 0, 27291
IAST [candidate] (26.93 ms) : 0, 26930
AppSec [baseline] (34.818 ms) : 0, 34818
AppSec [candidate] (34.644 ms) : 0, 34644
Debugger [baseline] (64.762 ms) : 0, 64762
Debugger [candidate] (64.749 ms) : 0, 64749
Remote Config [baseline] (532.421 µs) : 0, 532
Remote Config [candidate] (536.167 µs) : 0, 536
Telemetry [baseline] (8.737 ms) : 0, 8737
Telemetry [candidate] (8.756 ms) : 0, 8756
Flare Poller [baseline] (3.471 ms) : 0, 3471
Flare Poller [candidate] (3.481 ms) : 0, 3481
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.60.0-SNAPSHOT~8f7f04ca71, baseline=1.60.0-SNAPSHOT~7f5d7043a9

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1063867
Total [baseline] (10.932 s) : 0, 10931721
Agent [candidate] (1.072 s) : 0, 1072013
Total [candidate] (10.901 s) : 0, 10900977
section appsec
Agent [baseline] (1.242 s) : 0, 1241718
Total [baseline] (11.007 s) : 0, 11006902
Agent [candidate] (1.242 s) : 0, 1241693
Total [candidate] (11.046 s) : 0, 11045933
section iast
Agent [baseline] (1.227 s) : 0, 1226619
Total [baseline] (11.115 s) : 0, 11114583
Agent [candidate] (1.241 s) : 0, 1240889
Total [candidate] (11.318 s) : 0, 11317858
section profiling
Agent [baseline] (1.189 s) : 0, 1189410
Total [baseline] (10.954 s) : 0, 10954292
Agent [candidate] (1.191 s) : 0, 1190648
Total [candidate] (10.905 s) : 0, 10904804
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent appsec 1.242 s 177.851 ms (16.7%)
Agent iast 1.227 s 162.752 ms (15.3%)
Agent profiling 1.189 s 125.543 ms (11.8%)
Total tracing 10.932 s -
Total appsec 11.007 s 75.182 ms (0.7%)
Total iast 11.115 s 182.862 ms (1.7%)
Total profiling 10.954 s 22.571 ms (0.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.072 s -
Agent appsec 1.242 s 169.679 ms (15.8%)
Agent iast 1.241 s 168.875 ms (15.8%)
Agent profiling 1.191 s 118.635 ms (11.1%)
Total tracing 10.901 s -
Total appsec 11.046 s 144.956 ms (1.3%)
Total iast 11.318 s 416.881 ms (3.8%)
Total profiling 10.905 s 3.827 ms (0.0%)
gantt
    title petclinic - break down per module: candidate=1.60.0-SNAPSHOT~8f7f04ca71, baseline=1.60.0-SNAPSHOT~7f5d7043a9

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.203 ms) : 0, 1203
crashtracking [candidate] (1.196 ms) : 0, 1196
BytebuddyAgent [baseline] (626.607 ms) : 0, 626607
BytebuddyAgent [candidate] (631.833 ms) : 0, 631833
AgentMeter [baseline] (29.106 ms) : 0, 29106
AgentMeter [candidate] (29.191 ms) : 0, 29191
GlobalTracer [baseline] (257.171 ms) : 0, 257171
GlobalTracer [candidate] (258.708 ms) : 0, 258708
AppSec [baseline] (32.993 ms) : 0, 32993
AppSec [candidate] (33.226 ms) : 0, 33226
Debugger [baseline] (65.065 ms) : 0, 65065
Debugger [candidate] (66.519 ms) : 0, 66519
Remote Config [baseline] (606.7 µs) : 0, 607
Remote Config [candidate] (630.177 µs) : 0, 630
Telemetry [baseline] (9.805 ms) : 0, 9805
Telemetry [candidate] (10.671 ms) : 0, 10671
Flare Poller [baseline] (5.287 ms) : 0, 5287
Flare Poller [candidate] (3.787 ms) : 0, 3787
section appsec
crashtracking [baseline] (1.192 ms) : 0, 1192
crashtracking [candidate] (1.196 ms) : 0, 1196
BytebuddyAgent [baseline] (657.747 ms) : 0, 657747
BytebuddyAgent [candidate] (659.392 ms) : 0, 659392
AgentMeter [baseline] (11.955 ms) : 0, 11955
AgentMeter [candidate] (11.977 ms) : 0, 11977
GlobalTracer [baseline] (259.206 ms) : 0, 259206
GlobalTracer [candidate] (258.882 ms) : 0, 258882
IAST [baseline] (25.655 ms) : 0, 25655
IAST [candidate] (25.424 ms) : 0, 25424
AppSec [baseline] (168.584 ms) : 0, 168584
AppSec [candidate] (167.664 ms) : 0, 167664
Debugger [baseline] (67.328 ms) : 0, 67328
Debugger [candidate] (67.21 ms) : 0, 67210
Remote Config [baseline] (662.252 µs) : 0, 662
Remote Config [candidate] (651.424 µs) : 0, 651
Telemetry [baseline] (9.654 ms) : 0, 9654
Telemetry [candidate] (9.524 ms) : 0, 9524
Flare Poller [baseline] (3.75 ms) : 0, 3750
Flare Poller [candidate] (3.731 ms) : 0, 3731
section iast
crashtracking [baseline] (1.19 ms) : 0, 1190
crashtracking [candidate] (1.196 ms) : 0, 1196
BytebuddyAgent [baseline] (793.079 ms) : 0, 793079
BytebuddyAgent [candidate] (802.03 ms) : 0, 802030
AgentMeter [baseline] (11.206 ms) : 0, 11206
AgentMeter [candidate] (11.516 ms) : 0, 11516
GlobalTracer [baseline] (245.822 ms) : 0, 245822
GlobalTracer [candidate] (248.234 ms) : 0, 248234
IAST [baseline] (27.036 ms) : 0, 27036
IAST [candidate] (27.459 ms) : 0, 27459
AppSec [baseline] (35.492 ms) : 0, 35492
AppSec [candidate] (33.257 ms) : 0, 33257
Debugger [baseline] (64.383 ms) : 0, 64383
Debugger [candidate] (68.306 ms) : 0, 68306
Remote Config [baseline] (531.837 µs) : 0, 532
Remote Config [candidate] (544.0 µs) : 0, 544
Telemetry [baseline] (8.574 ms) : 0, 8574
Telemetry [candidate] (8.74 ms) : 0, 8740
Flare Poller [baseline] (3.408 ms) : 0, 3408
Flare Poller [candidate] (3.507 ms) : 0, 3507
section profiling
crashtracking [baseline] (1.163 ms) : 0, 1163
crashtracking [candidate] (1.156 ms) : 0, 1156
BytebuddyAgent [baseline] (681.177 ms) : 0, 681177
BytebuddyAgent [candidate] (682.252 ms) : 0, 682252
AgentMeter [baseline] (8.576 ms) : 0, 8576
AgentMeter [candidate] (8.554 ms) : 0, 8554
GlobalTracer [baseline] (215.658 ms) : 0, 215658
GlobalTracer [candidate] (216.2 ms) : 0, 216200
AppSec [baseline] (32.399 ms) : 0, 32399
AppSec [candidate] (32.456 ms) : 0, 32456
Debugger [baseline] (66.881 ms) : 0, 66881
Debugger [candidate] (66.07 ms) : 0, 66070
Remote Config [baseline] (621.592 µs) : 0, 622
Remote Config [candidate] (623.832 µs) : 0, 624
Telemetry [baseline] (8.886 ms) : 0, 8886
Telemetry [candidate] (9.64 ms) : 0, 9640
Flare Poller [baseline] (3.766 ms) : 0, 3766
Flare Poller [candidate] (3.781 ms) : 0, 3781
ProfilingAgent [baseline] (99.581 ms) : 0, 99581
ProfilingAgent [candidate] (99.173 ms) : 0, 99173
Profiling [baseline] (100.17 ms) : 0, 100170
Profiling [candidate] (99.749 ms) : 0, 99749
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master ygree/sqs-inject-tracing-context
git_commit_date 1772102129 1773440705
git_commit_sha 7f5d704 8f7f04c
release_version 1.60.0-SNAPSHOT~7f5d7043a9 1.60.0-SNAPSHOT~8f7f04ca71
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1773443184 1773443184
ci_job_id 1506132976 1506132976
ci_pipeline_id 102490902 102490902
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-237g693b 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-237g693b 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 5 performance improvements and 1 performance regressions! Performance is the same for 14 metrics, 16 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:profiling:high_load worse
[+53.706µs; +141.942µs] or [+3.426%; +9.054%]
unstable
[+230.825µs; +939.828µs] or [+5.363%; +21.838%]
unstable
[-442.303op/s; +53.428op/s] or [-18.627%; +2.250%]
1.666ms 4.889ms 2180.062op/s 1.568ms 4.304ms 2374.500op/s
scenario:load:insecure-bank:iast:high_load better
[-182.639µs; -88.259µs] or [-7.108%; -3.435%]
unsure
[-399.389µs; -44.970µs] or [-5.350%; -0.602%]
unstable
[-76.200op/s; +200.137op/s] or [-5.484%; +14.404%]
2.434ms 7.243ms 1451.438op/s 2.570ms 7.465ms 1389.469op/s
scenario:load:petclinic:no_agent:high_load better
[-2.742ms; -1.162ms] or [-14.565%; -6.171%]
unstable
[-4.563ms; -0.775ms] or [-14.496%; -2.461%]
unstable
[-1.081op/s; +52.206op/s] or [-0.445%; +21.511%]
16.877ms 28.810ms 268.250op/s 18.829ms 31.479ms 242.688op/s
scenario:load:petclinic:tracing:high_load unsure
[-1221.108µs; -353.467µs] or [-6.746%; -1.953%]
better
[-2.344ms; -0.875ms] or [-7.780%; -2.906%]
unstable
[-12.990op/s; +36.240op/s] or [-5.136%; +14.329%]
17.315ms 28.518ms 264.531op/s 18.102ms 30.128ms 252.906op/s
scenario:load:petclinic:profiling:high_load better
[-2.266ms; -1.124ms] or [-11.352%; -5.633%]
better
[-2.784ms; -0.999ms] or [-8.776%; -3.150%]
unstable
[-4.975op/s; +40.537op/s] or [-2.141%; +17.442%]
18.266ms 29.826ms 250.188op/s 19.961ms 31.717ms 232.406op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~8f7f04ca71, baseline=1.60.0-SNAPSHOT~7f5d7043a9
    dateFormat X
    axisFormat %s
section baseline
no_agent (19.235 ms) : 19035, 19436
.   : milestone, 19235,
appsec (18.962 ms) : 18771, 19154
.   : milestone, 18962,
code_origins (17.767 ms) : 17592, 17943
.   : milestone, 17767,
iast (17.871 ms) : 17691, 18052
.   : milestone, 17871,
profiling (20.087 ms) : 19879, 20295
.   : milestone, 20087,
tracing (18.457 ms) : 18265, 18648
.   : milestone, 18457,
section candidate
no_agent (17.391 ms) : 17213, 17569
.   : milestone, 17391,
appsec (18.925 ms) : 18732, 19118
.   : milestone, 18925,
code_origins (17.792 ms) : 17621, 17963
.   : milestone, 17792,
iast (17.685 ms) : 17512, 17858
.   : milestone, 17685,
profiling (18.654 ms) : 18468, 18840
.   : milestone, 18654,
tracing (17.642 ms) : 17467, 17817
.   : milestone, 17642,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.235 ms [19.035 ms, 19.436 ms] -
appsec 18.962 ms [18.771 ms, 19.154 ms] -273.13 µs (-1.4%)
code_origins 17.767 ms [17.592 ms, 17.943 ms] -1.468 ms (-7.6%)
iast 17.871 ms [17.691 ms, 18.052 ms] -1.364 ms (-7.1%)
profiling 20.087 ms [19.879 ms, 20.295 ms] 851.689 µs (4.4%)
tracing 18.457 ms [18.265 ms, 18.648 ms] -778.627 µs (-4.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 17.391 ms [17.213 ms, 17.569 ms] -
appsec 18.925 ms [18.732 ms, 19.118 ms] 1.534 ms (8.8%)
code_origins 17.792 ms [17.621 ms, 17.963 ms] 401.112 µs (2.3%)
iast 17.685 ms [17.512 ms, 17.858 ms] 293.718 µs (1.7%)
profiling 18.654 ms [18.468 ms, 18.84 ms] 1.263 ms (7.3%)
tracing 17.642 ms [17.467 ms, 17.817 ms] 250.891 µs (1.4%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~8f7f04ca71, baseline=1.60.0-SNAPSHOT~7f5d7043a9
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.183 ms) : 1171, 1194
.   : milestone, 1183,
iast (3.295 ms) : 3250, 3340
.   : milestone, 3295,
iast_FULL (5.952 ms) : 5892, 6011
.   : milestone, 5952,
iast_GLOBAL (3.525 ms) : 3466, 3584
.   : milestone, 3525,
profiling (1.897 ms) : 1881, 1913
.   : milestone, 1897,
tracing (1.749 ms) : 1734, 1763
.   : milestone, 1749,
section candidate
no_agent (1.187 ms) : 1175, 1198
.   : milestone, 1187,
iast (3.149 ms) : 3108, 3191
.   : milestone, 3149,
iast_FULL (6.024 ms) : 5962, 6085
.   : milestone, 6024,
iast_GLOBAL (3.498 ms) : 3433, 3563
.   : milestone, 3498,
profiling (2.072 ms) : 2052, 2093
.   : milestone, 2072,
tracing (1.819 ms) : 1804, 1834
.   : milestone, 1819,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.183 ms [1.171 ms, 1.194 ms] -
iast 3.295 ms [3.25 ms, 3.34 ms] 2.112 ms (178.6%)
iast_FULL 5.952 ms [5.892 ms, 6.011 ms] 4.769 ms (403.3%)
iast_GLOBAL 3.525 ms [3.466 ms, 3.584 ms] 2.342 ms (198.1%)
profiling 1.897 ms [1.881 ms, 1.913 ms] 714.393 µs (60.4%)
tracing 1.749 ms [1.734 ms, 1.763 ms] 566.085 µs (47.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.187 ms [1.175 ms, 1.198 ms] -
iast 3.149 ms [3.108 ms, 3.191 ms] 1.963 ms (165.4%)
iast_FULL 6.024 ms [5.962 ms, 6.085 ms] 4.837 ms (407.6%)
iast_GLOBAL 3.498 ms [3.433 ms, 3.563 ms] 2.311 ms (194.8%)
profiling 2.072 ms [2.052 ms, 2.093 ms] 885.694 µs (74.6%)
tracing 1.819 ms [1.804 ms, 1.834 ms] 632.501 µs (53.3%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master ygree/sqs-inject-tracing-context
git_commit_date 1772102129 1773440705
git_commit_sha 7f5d704 8f7f04c
release_version 1.60.0-SNAPSHOT~7f5d7043a9 1.60.0-SNAPSHOT~8f7f04ca71
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1773442906 1773442906
ci_job_id 1506132977 1506132977
ci_pipeline_id 102490902 102490902
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-c9flhvm7 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-c9flhvm7 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~8f7f04ca71, baseline=1.60.0-SNAPSHOT~7f5d7043a9
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.968 s) : 14968000, 14968000
.   : milestone, 14968000,
appsec (14.979 s) : 14979000, 14979000
.   : milestone, 14979000,
iast (17.97 s) : 17970000, 17970000
.   : milestone, 17970000,
iast_GLOBAL (17.745 s) : 17745000, 17745000
.   : milestone, 17745000,
profiling (14.893 s) : 14893000, 14893000
.   : milestone, 14893000,
tracing (14.703 s) : 14703000, 14703000
.   : milestone, 14703000,
section candidate
no_agent (15.664 s) : 15664000, 15664000
.   : milestone, 15664000,
appsec (14.706 s) : 14706000, 14706000
.   : milestone, 14706000,
iast (18.173 s) : 18173000, 18173000
.   : milestone, 18173000,
iast_GLOBAL (17.823 s) : 17823000, 17823000
.   : milestone, 17823000,
profiling (14.992 s) : 14992000, 14992000
.   : milestone, 14992000,
tracing (14.538 s) : 14538000, 14538000
.   : milestone, 14538000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.968 s [14.968 s, 14.968 s] -
appsec 14.979 s [14.979 s, 14.979 s] 11.0 ms (0.1%)
iast 17.97 s [17.97 s, 17.97 s] 3.002 s (20.1%)
iast_GLOBAL 17.745 s [17.745 s, 17.745 s] 2.777 s (18.6%)
profiling 14.893 s [14.893 s, 14.893 s] -75.0 ms (-0.5%)
tracing 14.703 s [14.703 s, 14.703 s] -265.0 ms (-1.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.664 s [15.664 s, 15.664 s] -
appsec 14.706 s [14.706 s, 14.706 s] -958.0 ms (-6.1%)
iast 18.173 s [18.173 s, 18.173 s] 2.509 s (16.0%)
iast_GLOBAL 17.823 s [17.823 s, 17.823 s] 2.159 s (13.8%)
profiling 14.992 s [14.992 s, 14.992 s] -672.0 ms (-4.3%)
tracing 14.538 s [14.538 s, 14.538 s] -1.126 s (-7.2%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~8f7f04ca71, baseline=1.60.0-SNAPSHOT~7f5d7043a9
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.474 ms) : 1463, 1486
.   : milestone, 1474,
appsec (2.514 ms) : 2459, 2568
.   : milestone, 2514,
iast (2.256 ms) : 2186, 2325
.   : milestone, 2256,
iast_GLOBAL (2.293 ms) : 2223, 2363
.   : milestone, 2293,
profiling (2.11 ms) : 2054, 2167
.   : milestone, 2110,
tracing (2.06 ms) : 2006, 2113
.   : milestone, 2060,
section candidate
no_agent (1.475 ms) : 1464, 1487
.   : milestone, 1475,
appsec (3.795 ms) : 3572, 4017
.   : milestone, 3795,
iast (2.254 ms) : 2186, 2323
.   : milestone, 2254,
iast_GLOBAL (2.291 ms) : 2221, 2360
.   : milestone, 2291,
profiling (2.095 ms) : 2039, 2152
.   : milestone, 2095,
tracing (2.064 ms) : 2010, 2117
.   : milestone, 2064,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.463 ms, 1.486 ms] -
appsec 2.514 ms [2.459 ms, 2.568 ms] 1.039 ms (70.5%)
iast 2.256 ms [2.186 ms, 2.325 ms] 781.362 µs (53.0%)
iast_GLOBAL 2.293 ms [2.223 ms, 2.363 ms] 818.652 µs (55.5%)
profiling 2.11 ms [2.054 ms, 2.167 ms] 635.99 µs (43.1%)
tracing 2.06 ms [2.006 ms, 2.113 ms] 585.505 µs (39.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.464 ms, 1.487 ms] -
appsec 3.795 ms [3.572 ms, 4.017 ms] 2.319 ms (157.2%)
iast 2.254 ms [2.186 ms, 2.323 ms] 778.904 µs (52.8%)
iast_GLOBAL 2.291 ms [2.221 ms, 2.36 ms] 815.213 µs (55.3%)
profiling 2.095 ms [2.039 ms, 2.152 ms] 619.991 µs (42.0%)
tracing 2.064 ms [2.01 ms, 2.117 ms] 588.055 µs (39.9%)

Moving newContext/getContext outside the per-entry loop prevents creating
a new span per entry where each overwrites the same contextStore slot,
leaking all but the last span and injecting mismatched parent IDs into
earlier batch messages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: aws sdk AWS SDK instrumentation tag: ai generated Largely based on code generated by an AI or LLM type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants