Skip to content

fix: SNS v2 batch injection bug#11190

Open
ygree wants to merge 3 commits intomasterfrom
ygree/fix-sns-v2-batch-injection
Open

fix: SNS v2 batch injection bug#11190
ygree wants to merge 3 commits intomasterfrom
ygree/fix-sns-v2-batch-injection

Conversation

@ygree
Copy link
Copy Markdown
Contributor

@ygree ygree commented Apr 22, 2026

What Does This Do

Fixes SNS v2 batch injection bug that causes a batch entry to be dropped when the number of attributes exceeded limits.

  • adds a test that reproduces the bug
  • migrates one existing test from Spock to JUnit as it fits more the purpose
  • cleans up some dups

Motivation

Fix the bug affecting the application's logic due to an instrumentation flaw.

Additional Notes

Ref: #7150

Contributor Checklist

Jira ticket: APMS-19177

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.

…dropped when number of attributes exceeded limits
@ygree ygree self-assigned this Apr 22, 2026
@ygree ygree added type: bug Bug report and fix inst: aws sdk AWS SDK instrumentation labels Apr 22, 2026
@ygree ygree changed the title fix: S v2 batch injection fix: SNS v2 batch injection Apr 22, 2026
.region(Region.of("us-east-1"))
.credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("test", "test")))
.build()
.endpointOverride(URI.create(endPoint))
Copy link
Copy Markdown
Contributor Author

@ygree ygree Apr 22, 2026

Choose a reason for hiding this comment

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

These parts and below were auto-formatted on commit

@ygree ygree force-pushed the ygree/fix-sns-v2-batch-injection branch from 71e79cc to c1725ee Compare April 22, 2026 21:46
public class SnsInterceptorTest {

@Test
void publishBatchPreservesEntriesAndOnlyInjectsBelowTheMessageAttributeLimit() {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

New test that reproduces the issue

}

@Test
void publishPreservesReadonlyAttributesWhileAddingDatadogContext() {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Migrated from Spock to JUnit

@ygree ygree force-pushed the ygree/fix-sns-v2-batch-injection branch 2 times, most recently from a63cb8c to f5bcaf7 Compare April 22, 2026 22:04
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 22, 2026

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master ygree/fix-sns-v2-batch-injection
git_commit_date 1776784552 1776902242
git_commit_sha 63343ba 46a68e0
release_version 1.62.0-SNAPSHOT~63343baba3 1.62.0-SNAPSHOT~46a68e05b5
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1776904019 1776904019
ci_job_id 1622343679 1622343679
ci_pipeline_id 109194599 109194599
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-6ohvvw8e 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-6ohvvw8e 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 61 metrics, 10 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~46a68e05b5, baseline=1.62.0-SNAPSHOT~63343baba3

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.062 s) : 0, 1061527
Total [baseline] (8.848 s) : 0, 8847606
Agent [candidate] (1.061 s) : 0, 1061110
Total [candidate] (8.828 s) : 0, 8827673
section iast
Agent [baseline] (1.239 s) : 0, 1239378
Total [baseline] (9.647 s) : 0, 9646644
Agent [candidate] (1.231 s) : 0, 1231237
Total [candidate] (9.564 s) : 0, 9564164
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.062 s -
Agent iast 1.239 s 177.851 ms (16.8%)
Total tracing 8.848 s -
Total iast 9.647 s 799.038 ms (9.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.061 s -
Agent iast 1.231 s 170.127 ms (16.0%)
Total tracing 8.828 s -
Total iast 9.564 s 736.491 ms (8.3%)
gantt
    title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~46a68e05b5, baseline=1.62.0-SNAPSHOT~63343baba3

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.243 ms) : 0, 1243
crashtracking [candidate] (1.247 ms) : 0, 1247
BytebuddyAgent [baseline] (635.703 ms) : 0, 635703
BytebuddyAgent [candidate] (636.93 ms) : 0, 636930
AgentMeter [baseline] (29.729 ms) : 0, 29729
AgentMeter [candidate] (29.735 ms) : 0, 29735
GlobalTracer [baseline] (249.643 ms) : 0, 249643
GlobalTracer [candidate] (249.751 ms) : 0, 249751
AppSec [baseline] (32.607 ms) : 0, 32607
AppSec [candidate] (32.298 ms) : 0, 32298
Debugger [baseline] (59.194 ms) : 0, 59194
Debugger [candidate] (58.834 ms) : 0, 58834
Remote Config [baseline] (585.815 µs) : 0, 586
Remote Config [candidate] (592.185 µs) : 0, 592
Telemetry [baseline] (8.82 ms) : 0, 8820
Telemetry [candidate] (7.992 ms) : 0, 7992
Flare Poller [baseline] (7.595 ms) : 0, 7595
Flare Poller [candidate] (7.444 ms) : 0, 7444
section iast
crashtracking [baseline] (1.258 ms) : 0, 1258
crashtracking [candidate] (1.235 ms) : 0, 1235
BytebuddyAgent [baseline] (817.171 ms) : 0, 817171
BytebuddyAgent [candidate] (809.333 ms) : 0, 809333
AgentMeter [baseline] (11.461 ms) : 0, 11461
AgentMeter [candidate] (11.421 ms) : 0, 11421
GlobalTracer [baseline] (239.222 ms) : 0, 239222
GlobalTracer [candidate] (239.155 ms) : 0, 239155
AppSec [baseline] (29.365 ms) : 0, 29365
AppSec [candidate] (26.623 ms) : 0, 26623
Debugger [baseline] (62.982 ms) : 0, 62982
Debugger [candidate] (64.889 ms) : 0, 64889
Remote Config [baseline] (532.071 µs) : 0, 532
Remote Config [candidate] (526.62 µs) : 0, 527
Telemetry [baseline] (7.791 ms) : 0, 7791
Telemetry [candidate] (7.749 ms) : 0, 7749
Flare Poller [baseline] (3.476 ms) : 0, 3476
Flare Poller [candidate] (3.417 ms) : 0, 3417
IAST [baseline] (29.087 ms) : 0, 29087
IAST [candidate] (29.98 ms) : 0, 29980
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~46a68e05b5, baseline=1.62.0-SNAPSHOT~63343baba3

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.06 s) : 0, 1059571
Total [baseline] (11.086 s) : 0, 11086431
Agent [candidate] (1.063 s) : 0, 1063192
Total [candidate] (11.152 s) : 0, 11152453
section appsec
Agent [baseline] (1.269 s) : 0, 1269072
Total [baseline] (11.092 s) : 0, 11091906
Agent [candidate] (1.261 s) : 0, 1260548
Total [candidate] (10.969 s) : 0, 10969313
section iast
Agent [baseline] (1.241 s) : 0, 1241246
Total [baseline] (11.4 s) : 0, 11400410
Agent [candidate] (1.235 s) : 0, 1234634
Total [candidate] (11.461 s) : 0, 11460744
section profiling
Agent [baseline] (1.187 s) : 0, 1187253
Total [baseline] (11.006 s) : 0, 11005864
Agent [candidate] (1.187 s) : 0, 1186941
Total [candidate] (11.067 s) : 0, 11066609
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.06 s -
Agent appsec 1.269 s 209.501 ms (19.8%)
Agent iast 1.241 s 181.674 ms (17.1%)
Agent profiling 1.187 s 127.681 ms (12.1%)
Total tracing 11.086 s -
Total appsec 11.092 s 5.475 ms (0.0%)
Total iast 11.4 s 313.979 ms (2.8%)
Total profiling 11.006 s -80.566 ms (-0.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.063 s -
Agent appsec 1.261 s 197.355 ms (18.6%)
Agent iast 1.235 s 171.442 ms (16.1%)
Agent profiling 1.187 s 123.748 ms (11.6%)
Total tracing 11.152 s -
Total appsec 10.969 s -183.14 ms (-1.6%)
Total iast 11.461 s 308.291 ms (2.8%)
Total profiling 11.067 s -85.844 ms (-0.8%)
gantt
    title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~46a68e05b5, baseline=1.62.0-SNAPSHOT~63343baba3

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.242 ms) : 0, 1242
crashtracking [candidate] (1.24 ms) : 0, 1240
BytebuddyAgent [baseline] (633.156 ms) : 0, 633156
BytebuddyAgent [candidate] (635.112 ms) : 0, 635112
AgentMeter [baseline] (29.897 ms) : 0, 29897
AgentMeter [candidate] (29.64 ms) : 0, 29640
GlobalTracer [baseline] (250.684 ms) : 0, 250684
GlobalTracer [candidate] (249.521 ms) : 0, 249521
AppSec [baseline] (32.597 ms) : 0, 32597
AppSec [candidate] (32.461 ms) : 0, 32461
Debugger [baseline] (60.318 ms) : 0, 60318
Debugger [candidate] (60.268 ms) : 0, 60268
Remote Config [baseline] (597.395 µs) : 0, 597
Remote Config [candidate] (598.388 µs) : 0, 598
Telemetry [baseline] (8.08 ms) : 0, 8080
Telemetry [candidate] (8.105 ms) : 0, 8105
Flare Poller [baseline] (6.778 ms) : 0, 6778
Flare Poller [candidate] (9.84 ms) : 0, 9840
section appsec
crashtracking [baseline] (1.251 ms) : 0, 1251
crashtracking [candidate] (1.252 ms) : 0, 1252
BytebuddyAgent [baseline] (678.342 ms) : 0, 678342
BytebuddyAgent [candidate] (673.995 ms) : 0, 673995
AgentMeter [baseline] (12.18 ms) : 0, 12180
AgentMeter [candidate] (12.128 ms) : 0, 12128
GlobalTracer [baseline] (250.026 ms) : 0, 250026
GlobalTracer [candidate] (248.626 ms) : 0, 248626
IAST [baseline] (24.5 ms) : 0, 24500
IAST [candidate] (24.275 ms) : 0, 24275
AppSec [baseline] (186.803 ms) : 0, 186803
AppSec [candidate] (187.168 ms) : 0, 187168
Debugger [baseline] (67.171 ms) : 0, 67171
Debugger [candidate] (64.804 ms) : 0, 64804
Remote Config [baseline] (595.21 µs) : 0, 595
Remote Config [candidate] (588.811 µs) : 0, 589
Telemetry [baseline] (8.079 ms) : 0, 8079
Telemetry [candidate] (7.836 ms) : 0, 7836
Flare Poller [baseline] (3.553 ms) : 0, 3553
Flare Poller [candidate] (3.432 ms) : 0, 3432
section iast
crashtracking [baseline] (1.228 ms) : 0, 1228
crashtracking [candidate] (1.225 ms) : 0, 1225
BytebuddyAgent [baseline] (815.833 ms) : 0, 815833
BytebuddyAgent [candidate] (810.782 ms) : 0, 810782
AgentMeter [baseline] (11.538 ms) : 0, 11538
AgentMeter [candidate] (11.462 ms) : 0, 11462
GlobalTracer [baseline] (240.467 ms) : 0, 240467
GlobalTracer [candidate] (239.795 ms) : 0, 239795
IAST [baseline] (28.586 ms) : 0, 28586
IAST [candidate] (29.292 ms) : 0, 29292
AppSec [baseline] (27.939 ms) : 0, 27939
AppSec [candidate] (27.502 ms) : 0, 27502
Debugger [baseline] (67.528 ms) : 0, 67528
Debugger [candidate] (65.751 ms) : 0, 65751
Remote Config [baseline] (537.594 µs) : 0, 538
Remote Config [candidate] (535.669 µs) : 0, 536
Telemetry [baseline] (7.825 ms) : 0, 7825
Telemetry [candidate] (7.829 ms) : 0, 7829
Flare Poller [baseline] (3.442 ms) : 0, 3442
Flare Poller [candidate] (3.454 ms) : 0, 3454
section profiling
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.183 ms) : 0, 1183
BytebuddyAgent [baseline] (692.804 ms) : 0, 692804
BytebuddyAgent [candidate] (692.852 ms) : 0, 692852
AgentMeter [baseline] (9.268 ms) : 0, 9268
AgentMeter [candidate] (9.206 ms) : 0, 9206
GlobalTracer [baseline] (207.386 ms) : 0, 207386
GlobalTracer [candidate] (207.372 ms) : 0, 207372
AppSec [baseline] (32.868 ms) : 0, 32868
AppSec [candidate] (32.968 ms) : 0, 32968
Debugger [baseline] (65.946 ms) : 0, 65946
Debugger [candidate] (65.9 ms) : 0, 65900
Remote Config [baseline] (579.237 µs) : 0, 579
Remote Config [candidate] (585.871 µs) : 0, 586
Telemetry [baseline] (7.788 ms) : 0, 7788
Telemetry [candidate] (7.781 ms) : 0, 7781
Flare Poller [baseline] (3.552 ms) : 0, 3552
Flare Poller [candidate] (3.523 ms) : 0, 3523
ProfilingAgent [baseline] (94.289 ms) : 0, 94289
ProfilingAgent [candidate] (94.16 ms) : 0, 94160
Profiling [baseline] (94.848 ms) : 0, 94848
Profiling [candidate] (94.717 ms) : 0, 94717
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master ygree/fix-sns-v2-batch-injection
git_commit_date 1776784552 1776902242
git_commit_sha 63343ba 46a68e0
release_version 1.62.0-SNAPSHOT~63343baba3 1.62.0-SNAPSHOT~46a68e05b5
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1776904397 1776904397
ci_job_id 1622343680 1622343680
ci_pipeline_id 109194599 109194599
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-70jfwzqq 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-70jfwzqq 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:iast:high_load better
[-174.450µs; -70.187µs] or [-6.296%; -2.533%]
unsure
[-540.127µs; -114.293µs] or [-6.793%; -1.437%]
unstable
[-93.330op/s; +192.705op/s] or [-7.170%; +14.805%]
2.648ms 7.624ms 1351.312op/s 2.771ms 7.951ms 1301.625op/s
scenario:load:petclinic:profiling:high_load better
[-1378.105µs; -474.331µs] or [-7.345%; -2.528%]
unsure
[-1336.385µs; -11.678µs] or [-4.458%; -0.039%]
unstable
[-14.137op/s; +34.012op/s] or [-5.758%; +13.853%]
17.837ms 29.304ms 255.469op/s 18.763ms 29.978ms 245.531op/s
scenario:load:petclinic:iast:high_load better
[-1392.477µs; -550.416µs] or [-7.522%; -2.973%]
unsure
[-1.618ms; -0.433ms] or [-5.428%; -1.453%]
unstable
[-13.475op/s; +35.163op/s] or [-5.402%; +14.095%]
17.541ms 28.793ms 260.312op/s 18.513ms 29.819ms 249.469op/s
scenario:load:petclinic:code_origins:high_load better
[-1.676ms; -0.776ms] or [-8.903%; -4.121%]
better
[-1.918ms; -0.666ms] or [-6.358%; -2.207%]
unstable
[-9.106op/s; +39.668op/s] or [-3.720%; +16.206%]
17.595ms 28.876ms 260.062op/s 18.821ms 30.168ms 244.781op/s
scenario:load:petclinic:tracing:high_load worse
[+0.732ms; +1.702ms] or [+4.131%; +9.604%]
unsure
[+0.351ms; +1.928ms] or [+1.211%; +6.646%]
unstable
[-37.402op/s; +11.090op/s] or [-14.511%; +4.303%]
18.941ms 30.146ms 244.594op/s 17.724ms 29.006ms 257.750op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~46a68e05b5, baseline=1.62.0-SNAPSHOT~63343baba3
    dateFormat X
    axisFormat %s
section baseline
no_agent (17.294 ms) : 17120, 17467
.   : milestone, 17294,
appsec (18.728 ms) : 18536, 18921
.   : milestone, 18728,
code_origins (19.067 ms) : 18878, 19257
.   : milestone, 19067,
iast (18.708 ms) : 18520, 18896
.   : milestone, 18708,
profiling (19.009 ms) : 18820, 19197
.   : milestone, 19009,
tracing (18.099 ms) : 17918, 18281
.   : milestone, 18099,
section candidate
no_agent (18.267 ms) : 18084, 18450
.   : milestone, 18267,
appsec (18.754 ms) : 18566, 18941
.   : milestone, 18754,
code_origins (17.941 ms) : 17764, 18118
.   : milestone, 17941,
iast (17.921 ms) : 17744, 18099
.   : milestone, 17921,
profiling (18.264 ms) : 18084, 18445
.   : milestone, 18264,
tracing (19.079 ms) : 18887, 19271
.   : milestone, 19079,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 17.294 ms [17.12 ms, 17.467 ms] -
appsec 18.728 ms [18.536 ms, 18.921 ms] 1.435 ms (8.3%)
code_origins 19.067 ms [18.878 ms, 19.257 ms] 1.774 ms (10.3%)
iast 18.708 ms [18.52 ms, 18.896 ms] 1.414 ms (8.2%)
profiling 19.009 ms [18.82 ms, 19.197 ms] 1.715 ms (9.9%)
tracing 18.099 ms [17.918 ms, 18.281 ms] 805.93 µs (4.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.267 ms [18.084 ms, 18.45 ms] -
appsec 18.754 ms [18.566 ms, 18.941 ms] 486.452 µs (2.7%)
code_origins 17.941 ms [17.764 ms, 18.118 ms] -326.23 µs (-1.8%)
iast 17.921 ms [17.744 ms, 18.099 ms] -345.728 µs (-1.9%)
profiling 18.264 ms [18.084 ms, 18.445 ms] -2.64 µs (-0.0%)
tracing 19.079 ms [18.887 ms, 19.271 ms] 811.904 µs (4.4%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~46a68e05b5, baseline=1.62.0-SNAPSHOT~63343baba3
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.266 ms) : 1253, 1279
.   : milestone, 1266,
iast (3.522 ms) : 3472, 3571
.   : milestone, 3522,
iast_FULL (5.989 ms) : 5928, 6049
.   : milestone, 5989,
iast_GLOBAL (3.711 ms) : 3652, 3770
.   : milestone, 3711,
profiling (2.22 ms) : 2198, 2241
.   : milestone, 2220,
tracing (1.871 ms) : 1855, 1888
.   : milestone, 1871,
section candidate
no_agent (1.248 ms) : 1237, 1260
.   : milestone, 1248,
iast (3.389 ms) : 3339, 3439
.   : milestone, 3389,
iast_FULL (6.038 ms) : 5977, 6100
.   : milestone, 6038,
iast_GLOBAL (3.727 ms) : 3664, 3789
.   : milestone, 3727,
profiling (2.185 ms) : 2165, 2206
.   : milestone, 2185,
tracing (1.903 ms) : 1886, 1919
.   : milestone, 1903,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.266 ms [1.253 ms, 1.279 ms] -
iast 3.522 ms [3.472 ms, 3.571 ms] 2.256 ms (178.2%)
iast_FULL 5.989 ms [5.928 ms, 6.049 ms] 4.723 ms (373.1%)
iast_GLOBAL 3.711 ms [3.652 ms, 3.77 ms] 2.445 ms (193.2%)
profiling 2.22 ms [2.198 ms, 2.241 ms] 953.769 µs (75.3%)
tracing 1.871 ms [1.855 ms, 1.888 ms] 605.303 µs (47.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.248 ms [1.237 ms, 1.26 ms] -
iast 3.389 ms [3.339 ms, 3.439 ms] 2.141 ms (171.5%)
iast_FULL 6.038 ms [5.977 ms, 6.1 ms] 4.79 ms (383.7%)
iast_GLOBAL 3.727 ms [3.664 ms, 3.789 ms] 2.478 ms (198.5%)
profiling 2.185 ms [2.165 ms, 2.206 ms] 936.87 µs (75.0%)
tracing 1.903 ms [1.886 ms, 1.919 ms] 654.165 µs (52.4%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master ygree/fix-sns-v2-batch-injection
git_commit_date 1776784552 1776902242
git_commit_sha 63343ba 46a68e0
release_version 1.62.0-SNAPSHOT~63343baba3 1.62.0-SNAPSHOT~46a68e05b5
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1776904244 1776904244
ci_job_id 1622343681 1622343681
ci_pipeline_id 109194599 109194599
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-dcw2okql 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-dcw2okql 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.62.0-SNAPSHOT~46a68e05b5, baseline=1.62.0-SNAPSHOT~63343baba3
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.531 s) : 15531000, 15531000
.   : milestone, 15531000,
appsec (14.828 s) : 14828000, 14828000
.   : milestone, 14828000,
iast (18.255 s) : 18255000, 18255000
.   : milestone, 18255000,
iast_GLOBAL (18.432 s) : 18432000, 18432000
.   : milestone, 18432000,
profiling (15.511 s) : 15511000, 15511000
.   : milestone, 15511000,
tracing (14.87 s) : 14870000, 14870000
.   : milestone, 14870000,
section candidate
no_agent (15.4 s) : 15400000, 15400000
.   : milestone, 15400000,
appsec (14.941 s) : 14941000, 14941000
.   : milestone, 14941000,
iast (18.924 s) : 18924000, 18924000
.   : milestone, 18924000,
iast_GLOBAL (17.957 s) : 17957000, 17957000
.   : milestone, 17957000,
profiling (15.439 s) : 15439000, 15439000
.   : milestone, 15439000,
tracing (14.75 s) : 14750000, 14750000
.   : milestone, 14750000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.531 s [15.531 s, 15.531 s] -
appsec 14.828 s [14.828 s, 14.828 s] -703.0 ms (-4.5%)
iast 18.255 s [18.255 s, 18.255 s] 2.724 s (17.5%)
iast_GLOBAL 18.432 s [18.432 s, 18.432 s] 2.901 s (18.7%)
profiling 15.511 s [15.511 s, 15.511 s] -20.0 ms (-0.1%)
tracing 14.87 s [14.87 s, 14.87 s] -661.0 ms (-4.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.4 s [15.4 s, 15.4 s] -
appsec 14.941 s [14.941 s, 14.941 s] -459.0 ms (-3.0%)
iast 18.924 s [18.924 s, 18.924 s] 3.524 s (22.9%)
iast_GLOBAL 17.957 s [17.957 s, 17.957 s] 2.557 s (16.6%)
profiling 15.439 s [15.439 s, 15.439 s] 39.0 ms (0.3%)
tracing 14.75 s [14.75 s, 14.75 s] -650.0 ms (-4.2%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~46a68e05b5, baseline=1.62.0-SNAPSHOT~63343baba3
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.484 ms) : 1472, 1495
.   : milestone, 1484,
appsec (3.839 ms) : 3614, 4063
.   : milestone, 3839,
iast (2.282 ms) : 2213, 2352
.   : milestone, 2282,
iast_GLOBAL (2.321 ms) : 2251, 2391
.   : milestone, 2321,
profiling (2.105 ms) : 2050, 2160
.   : milestone, 2105,
tracing (2.077 ms) : 2023, 2130
.   : milestone, 2077,
section candidate
no_agent (1.492 ms) : 1481, 1504
.   : milestone, 1492,
appsec (3.886 ms) : 3655, 4117
.   : milestone, 3886,
iast (2.284 ms) : 2213, 2354
.   : milestone, 2284,
iast_GLOBAL (2.33 ms) : 2259, 2400
.   : milestone, 2330,
profiling (2.093 ms) : 2038, 2148
.   : milestone, 2093,
tracing (2.082 ms) : 2029, 2136
.   : milestone, 2082,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.484 ms [1.472 ms, 1.495 ms] -
appsec 3.839 ms [3.614 ms, 4.063 ms] 2.355 ms (158.7%)
iast 2.282 ms [2.213 ms, 2.352 ms] 798.726 µs (53.8%)
iast_GLOBAL 2.321 ms [2.251 ms, 2.391 ms] 837.371 µs (56.4%)
profiling 2.105 ms [2.05 ms, 2.16 ms] 621.164 µs (41.9%)
tracing 2.077 ms [2.023 ms, 2.13 ms] 592.835 µs (40.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.492 ms [1.481 ms, 1.504 ms] -
appsec 3.886 ms [3.655 ms, 4.117 ms] 2.394 ms (160.4%)
iast 2.284 ms [2.213 ms, 2.354 ms] 791.385 µs (53.0%)
iast_GLOBAL 2.33 ms [2.259 ms, 2.4 ms] 837.408 µs (56.1%)
profiling 2.093 ms [2.038 ms, 2.148 ms] 600.326 µs (40.2%)
tracing 2.082 ms [2.029 ms, 2.136 ms] 589.956 µs (39.5%)

@ygree ygree changed the title fix: SNS v2 batch injection fix: SNS v2 batch injection bug Apr 22, 2026
withDatadogAttribute(entry.messageAttributes(), sdkBytes);
modified = entry.toBuilder().messageAttributes(messageAttributes).build();
}
entries.add(modified);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bug fix. Now add entry unconditionally

Map<String, MessageAttributeValue> modified = new HashMap<>(attributes);
// Use Binary since SNS subscription filter policies fail silently with JSON strings
// https://github.com/DataDog/datadog-lambda-js/pull/269
modified.put(
Copy link
Copy Markdown
Contributor Author

@ygree ygree Apr 22, 2026

Choose a reason for hiding this comment

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

Extract duplicated parts to this helper method

return context.request();
}

private DataStreamsTags getTags(String snsTopicName) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Inlined getTags as it's used only once

public class SnsInterceptor implements ExecutionInterceptor {

// SQS subscriber limit; SNS inherits it when SQS is used as a subscriber
private static final int MAX_MESSAGE_ATTRIBUTES = 10;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Introduce a constant for clarity and deduplication

abstract String expectedOperation(String awsService, String awsOperation)
abstract String expectedService(String awsService, String awsOperation)

def "trace details propagated when message attributes are readonly"() {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test has been moved to the JUnit test suit

@ygree ygree added the tag: ai generated Largely based on code generated by an AI or LLM label Apr 22, 2026
@ygree ygree force-pushed the ygree/fix-sns-v2-batch-injection branch from 324b6af to 4463b14 Compare April 22, 2026 23:54
@ygree ygree force-pushed the ygree/fix-sns-v2-batch-injection branch from 4463b14 to 46a68e0 Compare April 22, 2026 23:57
@ygree ygree marked this pull request as ready for review April 23, 2026 00:13
@ygree ygree requested review from a team as code owners April 23, 2026 00:13
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.

1 participant