Skip to content

Reduce SQS propagation attribute formatting overhead - #12562

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
andrea.marziali/sqs-attribute-formatting
Sep 21, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
andrea.marziali/sqs-attribute-formatting

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

Replace String.format() in both AWS SDK v1 and v2 SQS message-attribute injectors with direct string construction. When appending headers, use StringBuilder.append(existing, start, end) to avoid the intermediate substring. Output remains unchanged.

Standalone JMH results:

Operation Before → after, ns/op Before → after, B/op
First header 71.28 ± 5.81 → 8.44 ± 0.10 592 → 88
Append header 120.86 ± 4.11 → 37.30 ± 0.29 1,216 → 508

Benchmark: JMH 1.37, Temurin 17.0.18, Apple M4 Max, Java 8-compatible bytecode, one thread, three forks, three 1-second warmups and five 1-second measurements per fork, -prof gc, 512 MiB heap. Errors are 99.9% confidence half-widths.

The benchmark compared the exact before/after string-building expressions using 256 varying propagation values. The append case started with two existing headers. Results were returned to JMH, and output equivalence was checked before measurement. Benchmark sources 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 review from a team as code owners September 18, 2026 09:34
@amarziali amarziali added tag: performance Performance related changes inst: aws sdk AWS SDK instrumentation labels Sep 18, 2026
@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-18T09:35:57.334623Z e5dfa13 PR opened
🔒 Security Review ✅ Completed 2026-09-18T09:37:52.446345Z e5dfa13 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-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

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

Direct string construction keeps the prior serialized attribute text in both SQS injectors. The specialist reports no actionable regression.

Was this helpful? React 👍 or 👎

Open Bits AI session

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

@datadog-datadog-us1-prod

This comment has been minimized.

@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 13.98 s 14.05 s [-1.1%; +0.2%] (no difference)
startup:insecure-bank:tracing:Agent 12.86 s 12.99 s [-1.6%; -0.4%] (maybe better)
startup:petclinic:appsec:Agent 17.11 s 16.92 s [+0.3%; +1.9%] (maybe worse)
startup:petclinic:iast:Agent 17.03 s 17.09 s [-1.2%; +0.6%] (no difference)
startup:petclinic:profiling:Agent 16.87 s 16.99 s [-2.1%; +0.6%] (no difference)
startup:petclinic:sca:Agent 17.01 s 16.83 s [+0.1%; +2.0%] (maybe worse)
startup:petclinic:tracing:Agent 16.17 s 16.09 s [-0.6%; +1.6%] (no difference)

Commit: 5f3bb8c1 · 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.

@purple4reina purple4reina 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.

incredible!

@amarziali
amarziali added this pull request to the merge queue Sep 18, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-18 14:32:09 UTC ℹ️ Start processing command /merge


2026-09-18 14:32:14 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-18 15:54:17 UTC ❌ MergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 3b9cb08:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 18, 2026
@amarziali
amarziali enabled auto-merge September 21, 2026 07:07
@amarziali
amarziali added this pull request to the merge queue Sep 21, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-21 07:56:36 UTC ℹ️ Start processing command /merge


2026-09-21 07:56:41 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-21 09:55:40 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 21, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit fc0f25a into master Sep 21, 2026
605 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the andrea.marziali/sqs-attribute-formatting branch September 21, 2026 09:55
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 21, 2026
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.

3 participants