Skip to content

fix: SNS v2 batch injection bug#11190

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits intomasterfrom
ygree/fix-sns-v2-batch-injection
Apr 27, 2026
Merged

fix: SNS v2 batch injection bug#11190
gh-worker-dd-mergequeue-cf854d[bot] merged 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 1777306080
git_commit_sha 63343ba a03d54e
release_version 1.62.0-SNAPSHOT~63343baba3 1.62.0-SNAPSHOT~a03d54e3e8
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1777308066 1777308066
ci_job_id 1634411336 1634411336
ci_pipeline_id 109947534 109947534
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-thdl1zlk 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-thdl1zlk 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~a03d54e3e8, baseline=1.62.0-SNAPSHOT~63343baba3

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1056429
Total [baseline] (8.856 s) : 0, 8855732
Agent [candidate] (1.055 s) : 0, 1055168
Total [candidate] (8.825 s) : 0, 8825416
section iast
Agent [baseline] (1.239 s) : 0, 1239404
Total [baseline] (9.583 s) : 0, 9582524
Agent [candidate] (1.237 s) : 0, 1236866
Total [candidate] (9.558 s) : 0, 9557993
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent iast 1.239 s 182.975 ms (17.3%)
Total tracing 8.856 s -
Total iast 9.583 s 726.792 ms (8.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.055 s -
Agent iast 1.237 s 181.698 ms (17.2%)
Total tracing 8.825 s -
Total iast 9.558 s 732.577 ms (8.3%)
gantt
    title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~a03d54e3e8, baseline=1.62.0-SNAPSHOT~63343baba3

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.241 ms) : 0, 1241
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (632.965 ms) : 0, 632965
BytebuddyAgent [candidate] (632.147 ms) : 0, 632147
AgentMeter [baseline] (29.716 ms) : 0, 29716
AgentMeter [candidate] (29.486 ms) : 0, 29486
GlobalTracer [baseline] (249.236 ms) : 0, 249236
GlobalTracer [candidate] (248.367 ms) : 0, 248367
AppSec [baseline] (32.536 ms) : 0, 32536
AppSec [candidate] (32.286 ms) : 0, 32286
Debugger [baseline] (59.126 ms) : 0, 59126
Debugger [candidate] (58.73 ms) : 0, 58730
Remote Config [baseline] (615.217 µs) : 0, 615
Remote Config [candidate] (578.341 µs) : 0, 578
Telemetry [baseline] (8.031 ms) : 0, 8031
Telemetry [candidate] (8.723 ms) : 0, 8723
Flare Poller [baseline] (6.681 ms) : 0, 6681
Flare Poller [candidate] (7.514 ms) : 0, 7514
section iast
crashtracking [baseline] (1.244 ms) : 0, 1244
crashtracking [candidate] (1.224 ms) : 0, 1224
BytebuddyAgent [baseline] (815.369 ms) : 0, 815369
BytebuddyAgent [candidate] (814.216 ms) : 0, 814216
AgentMeter [baseline] (11.503 ms) : 0, 11503
AgentMeter [candidate] (11.518 ms) : 0, 11518
GlobalTracer [baseline] (240.171 ms) : 0, 240171
GlobalTracer [candidate] (239.459 ms) : 0, 239459
AppSec [baseline] (28.574 ms) : 0, 28574
AppSec [candidate] (26.688 ms) : 0, 26688
Debugger [baseline] (64.436 ms) : 0, 64436
Debugger [candidate] (64.236 ms) : 0, 64236
Remote Config [baseline] (533.815 µs) : 0, 534
Remote Config [candidate] (531.26 µs) : 0, 531
Telemetry [baseline] (7.786 ms) : 0, 7786
Telemetry [candidate] (7.742 ms) : 0, 7742
Flare Poller [baseline] (3.471 ms) : 0, 3471
Flare Poller [candidate] (3.429 ms) : 0, 3429
IAST [baseline] (30.129 ms) : 0, 30129
IAST [candidate] (30.84 ms) : 0, 30840
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~a03d54e3e8, baseline=1.62.0-SNAPSHOT~63343baba3

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1063768
Total [baseline] (11.07 s) : 0, 11070495
Agent [candidate] (1.057 s) : 0, 1057179
Total [candidate] (11.039 s) : 0, 11039129
section appsec
Agent [baseline] (1.264 s) : 0, 1263554
Total [baseline] (11.086 s) : 0, 11085828
Agent [candidate] (1.264 s) : 0, 1263527
Total [candidate] (11.061 s) : 0, 11061137
section iast
Agent [baseline] (1.236 s) : 0, 1235694
Total [baseline] (11.355 s) : 0, 11355496
Agent [candidate] (1.239 s) : 0, 1239406
Total [candidate] (11.318 s) : 0, 11317687
section profiling
Agent [baseline] (1.187 s) : 0, 1187096
Total [baseline] (10.942 s) : 0, 10941982
Agent [candidate] (1.189 s) : 0, 1189220
Total [candidate] (10.93 s) : 0, 10929985
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent appsec 1.264 s 199.786 ms (18.8%)
Agent iast 1.236 s 171.925 ms (16.2%)
Agent profiling 1.187 s 123.328 ms (11.6%)
Total tracing 11.07 s -
Total appsec 11.086 s 15.333 ms (0.1%)
Total iast 11.355 s 285.0 ms (2.6%)
Total profiling 10.942 s -128.513 ms (-1.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.057 s -
Agent appsec 1.264 s 206.348 ms (19.5%)
Agent iast 1.239 s 182.227 ms (17.2%)
Agent profiling 1.189 s 132.041 ms (12.5%)
Total tracing 11.039 s -
Total appsec 11.061 s 22.008 ms (0.2%)
Total iast 11.318 s 278.558 ms (2.5%)
Total profiling 10.93 s -109.144 ms (-1.0%)
gantt
    title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~a03d54e3e8, baseline=1.62.0-SNAPSHOT~63343baba3

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.231 ms) : 0, 1231
crashtracking [candidate] (1.228 ms) : 0, 1228
BytebuddyAgent [baseline] (634.08 ms) : 0, 634080
BytebuddyAgent [candidate] (631.476 ms) : 0, 631476
AgentMeter [baseline] (29.89 ms) : 0, 29890
AgentMeter [candidate] (29.587 ms) : 0, 29587
GlobalTracer [baseline] (251.021 ms) : 0, 251021
GlobalTracer [candidate] (248.771 ms) : 0, 248771
AppSec [baseline] (32.703 ms) : 0, 32703
AppSec [candidate] (32.314 ms) : 0, 32314
Debugger [baseline] (60.467 ms) : 0, 60467
Debugger [candidate] (59.983 ms) : 0, 59983
Remote Config [baseline] (595.65 µs) : 0, 596
Remote Config [candidate] (590.776 µs) : 0, 591
Telemetry [baseline] (8.92 ms) : 0, 8920
Telemetry [candidate] (8.037 ms) : 0, 8037
Flare Poller [baseline] (8.593 ms) : 0, 8593
Flare Poller [candidate] (9.093 ms) : 0, 9093
section appsec
crashtracking [baseline] (1.25 ms) : 0, 1250
crashtracking [candidate] (1.211 ms) : 0, 1211
BytebuddyAgent [baseline] (673.919 ms) : 0, 673919
BytebuddyAgent [candidate] (675.189 ms) : 0, 675189
AgentMeter [baseline] (12.187 ms) : 0, 12187
AgentMeter [candidate] (12.172 ms) : 0, 12172
GlobalTracer [baseline] (249.861 ms) : 0, 249861
GlobalTracer [candidate] (249.566 ms) : 0, 249566
IAST [baseline] (24.41 ms) : 0, 24410
IAST [candidate] (24.34 ms) : 0, 24340
AppSec [baseline] (186.328 ms) : 0, 186328
AppSec [candidate] (186.933 ms) : 0, 186933
Debugger [baseline] (67.187 ms) : 0, 67187
Debugger [candidate] (65.9 ms) : 0, 65900
Remote Config [baseline] (577.236 µs) : 0, 577
Remote Config [candidate] (579.75 µs) : 0, 580
Telemetry [baseline] (7.945 ms) : 0, 7945
Telemetry [candidate] (7.868 ms) : 0, 7868
Flare Poller [baseline] (3.489 ms) : 0, 3489
Flare Poller [candidate] (3.497 ms) : 0, 3497
section iast
crashtracking [baseline] (1.24 ms) : 0, 1240
crashtracking [candidate] (1.233 ms) : 0, 1233
BytebuddyAgent [baseline] (811.367 ms) : 0, 811367
BytebuddyAgent [candidate] (814.811 ms) : 0, 814811
AgentMeter [baseline] (11.439 ms) : 0, 11439
AgentMeter [candidate] (11.484 ms) : 0, 11484
GlobalTracer [baseline] (240.118 ms) : 0, 240118
GlobalTracer [candidate] (239.707 ms) : 0, 239707
IAST [baseline] (30.1 ms) : 0, 30100
IAST [candidate] (28.298 ms) : 0, 28298
AppSec [baseline] (28.576 ms) : 0, 28576
AppSec [candidate] (28.578 ms) : 0, 28578
Debugger [baseline] (64.915 ms) : 0, 64915
Debugger [candidate] (67.173 ms) : 0, 67173
Remote Config [baseline] (540.522 µs) : 0, 541
Remote Config [candidate] (536.182 µs) : 0, 536
Telemetry [baseline] (7.818 ms) : 0, 7818
Telemetry [candidate] (7.844 ms) : 0, 7844
Flare Poller [baseline] (3.414 ms) : 0, 3414
Flare Poller [candidate] (3.43 ms) : 0, 3430
section profiling
crashtracking [baseline] (1.187 ms) : 0, 1187
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (692.847 ms) : 0, 692847
BytebuddyAgent [candidate] (695.761 ms) : 0, 695761
AgentMeter [baseline] (9.215 ms) : 0, 9215
AgentMeter [candidate] (9.167 ms) : 0, 9167
GlobalTracer [baseline] (207.452 ms) : 0, 207452
GlobalTracer [candidate] (206.713 ms) : 0, 206713
AppSec [baseline] (32.914 ms) : 0, 32914
AppSec [candidate] (32.622 ms) : 0, 32622
Debugger [baseline] (66.072 ms) : 0, 66072
Debugger [candidate] (65.793 ms) : 0, 65793
Remote Config [baseline] (593.137 µs) : 0, 593
Remote Config [candidate] (588.192 µs) : 0, 588
Telemetry [baseline] (7.751 ms) : 0, 7751
Telemetry [candidate] (7.864 ms) : 0, 7864
Flare Poller [baseline] (3.62 ms) : 0, 3620
Flare Poller [candidate] (3.539 ms) : 0, 3539
ProfilingAgent [baseline] (94.132 ms) : 0, 94132
ProfilingAgent [candidate] (94.286 ms) : 0, 94286
Profiling [baseline] (94.704 ms) : 0, 94704
Profiling [candidate] (94.838 ms) : 0, 94838
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master ygree/fix-sns-v2-batch-injection
git_commit_date 1776784552 1777306080
git_commit_sha 63343ba a03d54e
release_version 1.62.0-SNAPSHOT~63343baba3 1.62.0-SNAPSHOT~a03d54e3e8
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1777308549 1777308549
ci_job_id 1634411339 1634411339
ci_pipeline_id 109947534 109947534
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-1-lna3bn33 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-1-lna3bn33 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 21 metrics, 15 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~a03d54e3e8, baseline=1.62.0-SNAPSHOT~63343baba3
    dateFormat X
    axisFormat %s
section baseline
no_agent (18.293 ms) : 18109, 18478
.   : milestone, 18293,
appsec (18.801 ms) : 18610, 18992
.   : milestone, 18801,
code_origins (17.774 ms) : 17602, 17947
.   : milestone, 17774,
iast (18.207 ms) : 18027, 18387
.   : milestone, 18207,
profiling (18.993 ms) : 18798, 19188
.   : milestone, 18993,
tracing (18.227 ms) : 18047, 18407
.   : milestone, 18227,
section candidate
no_agent (18.231 ms) : 18048, 18414
.   : milestone, 18231,
appsec (19.012 ms) : 18822, 19203
.   : milestone, 19012,
code_origins (17.871 ms) : 17692, 18049
.   : milestone, 17871,
iast (18.189 ms) : 18008, 18371
.   : milestone, 18189,
profiling (18.532 ms) : 18343, 18720
.   : milestone, 18532,
tracing (18.075 ms) : 17895, 18255
.   : milestone, 18075,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.293 ms [18.109 ms, 18.478 ms] -
appsec 18.801 ms [18.61 ms, 18.992 ms] 507.378 µs (2.8%)
code_origins 17.774 ms [17.602 ms, 17.947 ms] -519.116 µs (-2.8%)
iast 18.207 ms [18.027 ms, 18.387 ms] -86.326 µs (-0.5%)
profiling 18.993 ms [18.798 ms, 19.188 ms] 699.713 µs (3.8%)
tracing 18.227 ms [18.047 ms, 18.407 ms] -66.421 µs (-0.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.231 ms [18.048 ms, 18.414 ms] -
appsec 19.012 ms [18.822 ms, 19.203 ms] 781.278 µs (4.3%)
code_origins 17.871 ms [17.692 ms, 18.049 ms] -360.529 µs (-2.0%)
iast 18.189 ms [18.008 ms, 18.371 ms] -41.594 µs (-0.2%)
profiling 18.532 ms [18.343 ms, 18.72 ms] 300.738 µs (1.6%)
tracing 18.075 ms [17.895 ms, 18.255 ms] -156.219 µs (-0.9%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~a03d54e3e8, baseline=1.62.0-SNAPSHOT~63343baba3
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.255 ms) : 1243, 1267
.   : milestone, 1255,
iast (3.313 ms) : 3265, 3362
.   : milestone, 3313,
iast_FULL (6.022 ms) : 5961, 6084
.   : milestone, 6022,
iast_GLOBAL (3.709 ms) : 3648, 3770
.   : milestone, 3709,
profiling (2.127 ms) : 2106, 2148
.   : milestone, 2127,
tracing (1.883 ms) : 1867, 1899
.   : milestone, 1883,
section candidate
no_agent (1.251 ms) : 1239, 1264
.   : milestone, 1251,
iast (3.307 ms) : 3266, 3348
.   : milestone, 3307,
iast_FULL (5.984 ms) : 5922, 6047
.   : milestone, 5984,
iast_GLOBAL (3.744 ms) : 3684, 3805
.   : milestone, 3744,
profiling (2.046 ms) : 2028, 2064
.   : milestone, 2046,
tracing (1.902 ms) : 1886, 1917
.   : milestone, 1902,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.255 ms [1.243 ms, 1.267 ms] -
iast 3.313 ms [3.265 ms, 3.362 ms] 2.058 ms (164.0%)
iast_FULL 6.022 ms [5.961 ms, 6.084 ms] 4.767 ms (379.8%)
iast_GLOBAL 3.709 ms [3.648 ms, 3.77 ms] 2.454 ms (195.5%)
profiling 2.127 ms [2.106 ms, 2.148 ms] 871.835 µs (69.5%)
tracing 1.883 ms [1.867 ms, 1.899 ms] 627.794 µs (50.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.251 ms [1.239 ms, 1.264 ms] -
iast 3.307 ms [3.266 ms, 3.348 ms] 2.056 ms (164.3%)
iast_FULL 5.984 ms [5.922 ms, 6.047 ms] 4.733 ms (378.3%)
iast_GLOBAL 3.744 ms [3.684 ms, 3.805 ms] 2.493 ms (199.3%)
profiling 2.046 ms [2.028 ms, 2.064 ms] 794.483 µs (63.5%)
tracing 1.902 ms [1.886 ms, 1.917 ms] 650.359 µs (52.0%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master ygree/fix-sns-v2-batch-injection
git_commit_date 1776784552 1777306080
git_commit_sha 63343ba a03d54e
release_version 1.62.0-SNAPSHOT~63343baba3 1.62.0-SNAPSHOT~a03d54e3e8
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1777308234 1777308234
ci_job_id 1634411341 1634411341
ci_pipeline_id 109947534 109947534
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-qn6k4sc0 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-qn6k4sc0 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 tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~a03d54e3e8, baseline=1.62.0-SNAPSHOT~63343baba3
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.491 ms) : 1479, 1502
.   : milestone, 1491,
appsec (3.819 ms) : 3597, 4040
.   : milestone, 3819,
iast (2.286 ms) : 2216, 2356
.   : milestone, 2286,
iast_GLOBAL (2.323 ms) : 2253, 2393
.   : milestone, 2323,
profiling (2.092 ms) : 2037, 2147
.   : milestone, 2092,
tracing (2.091 ms) : 2037, 2145
.   : milestone, 2091,
section candidate
no_agent (1.488 ms) : 1476, 1499
.   : milestone, 1488,
appsec (3.747 ms) : 3529, 3964
.   : milestone, 3747,
iast (2.286 ms) : 2216, 2356
.   : milestone, 2286,
iast_GLOBAL (2.32 ms) : 2249, 2390
.   : milestone, 2320,
profiling (2.101 ms) : 2046, 2157
.   : milestone, 2101,
tracing (2.099 ms) : 2045, 2153
.   : milestone, 2099,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.491 ms [1.479 ms, 1.502 ms] -
appsec 3.819 ms [3.597 ms, 4.04 ms] 2.328 ms (156.2%)
iast 2.286 ms [2.216 ms, 2.356 ms] 795.451 µs (53.4%)
iast_GLOBAL 2.323 ms [2.253 ms, 2.393 ms] 832.734 µs (55.9%)
profiling 2.092 ms [2.037 ms, 2.147 ms] 601.135 µs (40.3%)
tracing 2.091 ms [2.037 ms, 2.145 ms] 600.318 µs (40.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.488 ms [1.476 ms, 1.499 ms] -
appsec 3.747 ms [3.529 ms, 3.964 ms] 2.259 ms (151.9%)
iast 2.286 ms [2.216 ms, 2.356 ms] 798.043 µs (53.6%)
iast_GLOBAL 2.32 ms [2.249 ms, 2.39 ms] 831.854 µs (55.9%)
profiling 2.101 ms [2.046 ms, 2.157 ms] 613.442 µs (41.2%)
tracing 2.099 ms [2.045 ms, 2.153 ms] 611.194 µs (41.1%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~a03d54e3e8, baseline=1.62.0-SNAPSHOT~63343baba3
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.576 s) : 15576000, 15576000
.   : milestone, 15576000,
appsec (14.691 s) : 14691000, 14691000
.   : milestone, 14691000,
iast (18.588 s) : 18588000, 18588000
.   : milestone, 18588000,
iast_GLOBAL (18.139 s) : 18139000, 18139000
.   : milestone, 18139000,
profiling (14.927 s) : 14927000, 14927000
.   : milestone, 14927000,
tracing (14.919 s) : 14919000, 14919000
.   : milestone, 14919000,
section candidate
no_agent (15.167 s) : 15167000, 15167000
.   : milestone, 15167000,
appsec (15.001 s) : 15001000, 15001000
.   : milestone, 15001000,
iast (18.278 s) : 18278000, 18278000
.   : milestone, 18278000,
iast_GLOBAL (18.144 s) : 18144000, 18144000
.   : milestone, 18144000,
profiling (14.915 s) : 14915000, 14915000
.   : milestone, 14915000,
tracing (14.965 s) : 14965000, 14965000
.   : milestone, 14965000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.576 s [15.576 s, 15.576 s] -
appsec 14.691 s [14.691 s, 14.691 s] -885.0 ms (-5.7%)
iast 18.588 s [18.588 s, 18.588 s] 3.012 s (19.3%)
iast_GLOBAL 18.139 s [18.139 s, 18.139 s] 2.563 s (16.5%)
profiling 14.927 s [14.927 s, 14.927 s] -649.0 ms (-4.2%)
tracing 14.919 s [14.919 s, 14.919 s] -657.0 ms (-4.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.167 s [15.167 s, 15.167 s] -
appsec 15.001 s [15.001 s, 15.001 s] -166.0 ms (-1.1%)
iast 18.278 s [18.278 s, 18.278 s] 3.111 s (20.5%)
iast_GLOBAL 18.144 s [18.144 s, 18.144 s] 2.977 s (19.6%)
profiling 14.915 s [14.915 s, 14.915 s] -252.0 ms (-1.7%)
tracing 14.965 s [14.965 s, 14.965 s] -202.0 ms (-1.3%)

@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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah yes thanks for pointing it out, though this comment was not showing up in the latest diff :p

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 2 times, most recently 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
@ygree ygree added this to the 1.62.0 milestone Apr 23, 2026
Copy link
Copy Markdown
Contributor

@vandonr vandonr left a comment

Choose a reason for hiding this comment

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

Nice, good catch, just left a comment for a potential performance regression ?
Pre-approving assuming you fix it if relevant.

withDatadogAttribute(entry.messageAttributes(), sdkBytes);
modified = entry.toBuilder().messageAttributes(messageAttributes).build();
}
entries.add(modified);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah yes thanks for pointing it out, though this comment was not showing up in the latest diff :p

@vandonr
Copy link
Copy Markdown
Contributor

vandonr commented Apr 27, 2026

@codex review

@ygree ygree force-pushed the ygree/fix-sns-v2-batch-injection branch from 46a68e0 to a03d54e Compare April 27, 2026 16:08
@ygree
Copy link
Copy Markdown
Contributor Author

ygree commented Apr 27, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented Apr 27, 2026

View all feedbacks in Devflow UI.

2026-04-27 17:15:53 UTC ℹ️ Start processing command /merge


2026-04-27 17:15:58 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-04-27 18:30:31 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit cde8f35 into master Apr 27, 2026
571 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the ygree/fix-sns-v2-batch-injection branch April 27, 2026 18:30
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