Skip to content

Fix Spray request scope close ownership - #12700

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
andrea.marziali/spray-scope-order
Sep 30, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
andrea.marziali/spray-scope-order

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

Spray’s response callback closes the request scope while a controller scope can still be active. Route-exit advice then attempts to close it again.

Keep scope closure exclusively in route-exit advice. The response callback retains the request context for decoration and finishes the span.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali
amarziali requested a review from a team as a code owner September 30, 2026 11:54
@amarziali amarziali added the type: bug fix Bug fix label Sep 30, 2026
@amarziali
amarziali removed the request for review from a team September 30, 2026 11:54
@amarziali amarziali added the inst: others All other instrumentations label Sep 30, 2026
@amarziali
amarziali requested a review from vandonr September 30, 2026 11:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 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-30T12:39:56.829150Z 9732a24 Manual request
🔒 Security Review ✅ Completed 2026-09-30T12:41:51.401392Z 9732a24 Manual request
ℹ️ 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-prod-us1-3 datadog-prod-us1-3 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.

Bits Code Review: PASS

More details

Passing the request Context instead of its ContextScope prevents callback double-close while preserving response decoration and span completion.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 6220835 · @DataDog review to ask questions

@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: 622083544c

ℹ️ 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-prod-us1-3

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 30, 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.03 s 13.97 s [-0.4%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent 12.86 s 12.98 s [-1.6%; -0.3%] (maybe better)
startup:petclinic:appsec:Agent 16.60 s 16.80 s [-5.7%; +3.2%] (no difference)
startup:petclinic:iast:Agent 16.99 s 16.97 s [-0.5%; +0.8%] (no difference)
startup:petclinic:profiling:Agent 16.62 s 16.81 s [-2.0%; -0.1%] (maybe better)
startup:petclinic:sca:Agent 16.98 s 16.25 s [+0.2%; +8.8%] (maybe worse)
startup:petclinic:tracing:Agent 16.07 s 16.07 s [-0.9%; +1.0%] (no difference)

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

@amarziali
amarziali requested a review from a team as a code owner September 30, 2026 12:32
@amarziali
amarziali requested review from sarahchen6 and removed request for a team September 30, 2026 12:32
@amarziali

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 9732a24991

ℹ️ 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-prod-us1-3 datadog-prod-us1-3 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.

Bits Code Review: PASS

More details

The atomic two-event completion state leaves scope closure to route-exit advice and finishes the span exactly once after both response decoration and scope closure, regardless of event order.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 9732a24 · @DataDog review to ask questions

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 9732a24991

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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

LGTM

@amarziali

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

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

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-30 18:57:28 UTC ℹ️ Start processing command /merge


2026-09-30 18:57:33 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-30 20:11:43 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 1bd111a into master Sep 30, 2026
816 of 818 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the andrea.marziali/spray-scope-order branch September 30, 2026 20:11
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: others All other instrumentations type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants