Skip to content

Fix SQS queue name tags from QueueUrl - #12159

Open
ygree wants to merge 3 commits into
masterfrom
ygree/fix-aws-sqs-queuename-from-url
Open

Fix SQS queue name tags from QueueUrl#12159
ygree wants to merge 3 commits into
masterfrom
ygree/fix-aws-sqs-queuename-from-url

Conversation

@ygree

@ygree ygree commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

For AWS SDK v2 SQS spans, sets aws.queue.name from the queue URL when the request/span only has QueueUrl.

This covers SQS message operations such as SendMessage, SendMessageBatch, DeleteMessage, and DeleteMessageBatch, and also SQS receive/time-in-queue spans created by the aws-java-sqs-2.0 instrumentation.

Motivation

In AWS SDK v2, SQS operations that act on messages identify the queue with QueueUrl, not QueueName. As a result, aws.queue.name was not set, and peer service inference could not use the queue name.

The queue URL contains the queue name as its final path segment, similar to how SNS topic names are derived from topic ARNs. This change extracts that queue name and sets the expected queue-name tags consistently across SQS spans.

Additional Notes

Added regression coverage for sync/async SDK v2 SQS operations, legacy SQS forked tests, receive spans, and time-in-queue spans. Tests pass locally.

Solves: #12155
Supersedes: #12157

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@ygree ygree self-assigned this Aug 6, 2026
@ygree ygree added type: bug fix Bug fix inst: aws sdk AWS SDK instrumentation labels Aug 6, 2026
@ygree

ygree commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a35fbf144

ℹ️ 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".

@datadog-official

datadog-official Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 69.73% (+11.81%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7cbe728 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 6, 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.79 s 14.75 s [-0.5%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent 13.62 s 13.71 s [-1.5%; +0.1%] (no difference)
startup:petclinic:appsec:Agent 17.37 s 17.15 s [+0.4%; +2.1%] (maybe worse)
startup:petclinic:iast:Agent 17.33 s 17.47 s [-1.5%; -0.0%] (maybe better)
startup:petclinic:profiling:Agent 16.62 s 17.27 s [-8.1%; +0.5%] (no difference)
startup:petclinic:sca:Agent 16.81 s 17.06 s [-5.8%; +2.8%] (no difference)
startup:petclinic:tracing:Agent 16.51 s 16.69 s [-2.1%; -0.1%] (maybe better)

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

@ygree

ygree commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: cd898aefea

ℹ️ 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".

@ygree
ygree marked this pull request as ready for review August 6, 2026 23:54
@ygree
ygree requested review from a team as code owners August 6, 2026 23:54
@ygree
ygree requested review from vandonr and removed request for a team August 6, 2026 23:54

@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

Queue names are now consistently derived from valid SQS QueueUrl path segments, including FIFO, query-bearing, and trailing-slash URLs; malformed or null URLs remain non-fatal and produce no fabricated tag. Focused Gradle tests could not start because plugin resolution returned HTTP 429, leaving framework-level regression execution unverified.

Was this helpful? React 👍 or 👎

📊 Validated against 6 scenarios · Open Bits AI session

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

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 type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants