Skip to content

Return the default async propagation setting when no scope is active - #13305

Open
mcculls wants to merge 1 commit into
masterfrom
mcculls/legacy-propagation-query
Open

mcculls wants to merge 1 commit into
masterfrom
mcculls/legacy-propagation-query

Conversation

@mcculls

@mcculls mcculls commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Return the default async propagation setting (enabled) when no scope is active.

Motivation

Async propagation is currently reported as disabled when there's no active scope, even though capture(context) is permitted in that state. Reporting the default also agrees with scope activation when there is no enclosing scope.

Note returning enabled here does not cause unnecessary capture of work. With no active scope, the current context is the root context, which async task capture already skips before allocating task state or a continuation. Explicit capture(root) also returns the shared root continuation rather than allocating one. Existing checks for invalid spans and explicitly disabled propagation on an active scope remain in place.

@mcculls mcculls added type: bug fix Bug fix tag: no release notes Changes to exclude from release notes comp: context propagation Trace context propagation tag: ai generated Largely based on code generated by an AI or LLM labels Nov 8, 2026
@datadog-datadog-prod-us1-2

This comment has been minimized.

@mcculls
mcculls force-pushed the mcculls/legacy-propagation-query branch from 61d54c4 to b09c0de Compare November 8, 2026 23:48
@dd-octo-sts

dd-octo-sts Bot commented Nov 9, 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.99 s 14.11 s [-1.6%; -0.1%] (maybe better)
startup:insecure-bank:tracing:Agent 12.97 s 13.03 s [-1.0%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 17.10 s 16.89 s [+0.2%; +2.2%] (maybe worse)
startup:petclinic:iast:Agent 16.27 s 17.06 s [-10.1%; +0.9%] (unstable)
startup:petclinic:profiling:Agent 16.61 s 16.59 s [-0.7%; +1.0%] (no difference)
startup:petclinic:sca:Agent 17.03 s 16.97 s [-0.5%; +1.2%] (no difference)
startup:petclinic:tracing:Agent 16.16 s 15.77 s [-2.0%; +7.0%] (no difference)

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

@mcculls
mcculls force-pushed the mcculls/legacy-propagation-query branch from b09c0de to f892cba Compare November 12, 2026 12:21
@mcculls
mcculls changed the base branch from master to mcculls/cleanup-activateManualSpan-usage November 12, 2026 12:21
@mcculls
mcculls added this pull request to stack #13397 November 12, 2026 12:21
@pr-commenter

pr-commenter Bot commented Nov 12, 2026

Copy link
Copy Markdown

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1794486548 1794486874
end_time 2026-11-12T12:30:35 2026-11-12T12:36:02
git_branch master mcculls/legacy-propagation-query
git_commit_sha 4591fbc f892cba
start_time 2026-11-12T12:29:09 2026-11-12T12:34:35
See matching parameters
Baseline Candidate
ci_job_id 2243878868 2243878868
ci_pipeline_id 152545983 152545983
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1794485773 1794485773

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics.

See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-28.085µs; +38.002µs] or [-8.876%; +12.010%]
unstable
[-39.360µs; +51.922µs] or [-11.236%; +14.823%]
unstable
[-48.889µs; +63.723µs] or [-13.405%; +17.472%]
unstable
[-78.956µs; +177.336µs] or [-6.817%; +15.312%]
same
scenario:basic same same same unstable
[-210.425µs; +32.506µs] or [-16.971%; +2.622%]
unstable
[-188.055op/s; +82.346op/s] or [-8.086%; +3.541%]
scenario:loop same same same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (350.29 µs) : 312, 388
.   : milestone, 350,
basic (327.448 µs) : 322, 333
.   : milestone, 327,
loop (8.095 ms) : 8032, 8159
.   : milestone, 8095,
section candidate
noprobe (356.571 µs) : 308, 405
.   : milestone, 357,
basic (327.44 µs) : 322, 333
.   : milestone, 327,
loop (8.091 ms) : 8029, 8154
.   : milestone, 8091,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 350.29 µs [312.474 µs, 388.106 µs]
basic 327.448 µs [322.382 µs, 332.514 µs]
loop 8.095 ms [8.032 ms, 8.159 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 356.571 µs [308.284 µs, 404.858 µs]
basic 327.44 µs [322.227 µs, 332.652 µs]
loop 8.091 ms [8.029 ms, 8.154 ms]

Base automatically changed from mcculls/cleanup-activateManualSpan-usage to master November 16, 2026 16:59
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot force-pushed the mcculls/legacy-propagation-query branch from f892cba to 5a2b0e1 Compare November 16, 2026 16:59
When no scope is active, report async propagation as enabled, matching the
default setting used when activating a scope without an enclosing scope.
This is also consistent with capture(context), which already permits capture
when there is no active scope to suppress propagation.

Add a regression test checking that the query reports propagation as enabled
and that a context can be captured without an active scope.
@mcculls
mcculls force-pushed the mcculls/legacy-propagation-query branch from 5a2b0e1 to fa90c81 Compare November 16, 2026 23:56
@mcculls
mcculls marked this pull request as ready for review November 17, 2026 00:06
@mcculls
mcculls requested review from a team as code owners November 17, 2026 00:06
@mcculls
mcculls requested review from amarziali and anna-git and removed request for a team November 17, 2026 00:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T00:08:38.769850Z fa90c81 Draft marked ready
ℹ️ 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-prod-us1-2 datadog-datadog-prod-us1-2 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.

Bits Code Review: PASS

More details

Returning enabled without an active scope matches existing activation and capture defaults. Active-scope suppression and root-context capture guards remain intact.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit fa90c81

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: context propagation Trace context propagation tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant