Skip to content

Reduce SQS body propagation parsing overhead - #12568

Open
amarziali wants to merge 1 commit into
masterfrom
andrea.marziali/sqs-streaming-body-context
Open

amarziali wants to merge 1 commit into
masterfrom
andrea.marziali/sqs-streaming-body-context

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

Extract propagation context from AWS SDK v1 SQS message bodies without building a JSON tree for the entire envelope.

Benchmark

Standalone JMH 1.37 on Temurin 17.0.18, Apple M4 Max, using Jackson 2.6.6:

Payload Before After Allocation before → after
64 KiB message string 121 µs 37 µs 67,425 → 1,056 B/op
1,024 unrelated nested objects 96 µs 54 µs 377,312 → 1,056 B/op
Same nested objects, no propagation attributes 97 µs 54 µs 376,656 → 568 B/op

Small-envelope allocation decreased from 1,976 to 992 B/op; timing confidence intervals overlap, so no speedup is claimed for that case.

Benchmark sources and raw results are retained locally and are not included in this PR.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali amarziali added the type: feature Enhancements and improvements label Sep 18, 2026
@amarziali
amarziali requested a review from a team as a code owner September 18, 2026 15:20
@amarziali amarziali added the tag: performance Performance related changes label Sep 18, 2026
@amarziali
amarziali requested review from a team as code owners September 18, 2026 15:20
@amarziali amarziali added the inst: aws sdk AWS SDK instrumentation label Sep 18, 2026
@amarziali
amarziali requested review from bric3 and removed request for a team September 18, 2026 15:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-18T15:24:08.113257Z 1ca5b9c PR opened
🔒 Security Review Completed 2026-09-18T15:24:09.443226Z 1ca5b9c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-official datadog-official Bot left a comment

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.

Datadog Autotest: PASS

More details

The streaming parser keeps the prior extraction behavior and does not build trees for unrelated JSON fields. The static review found no concrete defect.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 1ca5b9c · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@datadog-official

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 68.82% (+9.74%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1ca5b9c | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.04 s 14.05 s [-0.7%; +0.5%] (no difference)
startup:insecure-bank:tracing:Agent 12.93 s 13.01 s [-1.3%; +0.1%] (no difference)
startup:petclinic:appsec:Agent 17.58 s 16.73 s [+0.8%; +9.3%] (maybe worse)
startup:petclinic:iast:Agent 17.47 s 17.02 s [-1.6%; +6.9%] (no difference)
startup:petclinic:profiling:Agent 17.32 s 17.43 s [-1.8%; +0.5%] (no difference)
startup:petclinic:sca:Agent 17.55 s 17.45 s [-0.4%; +1.5%] (no difference)
startup:petclinic:tracing:Agent 16.58 s 16.71 s [-1.9%; +0.3%] (no difference)

Commit: 1ca5b9c9 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@bric3 bric3 left a comment

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.

Cool improvement !

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: performance Performance related changes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants