Skip to content

Propagate sampling metadata across trace chunks - #12092

Draft
sarahchen6 wants to merge 2 commits into
masterfrom
sarahchen6/apms19883
Draft

Propagate sampling metadata across trace chunks#12092
sarahchen6 wants to merge 2 commits into
masterfrom
sarahchen6/apms19883

Conversation

@sarahchen6

@sarahchen6 sarahchen6 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Propagate sampling metadata across trace chunks by copying over the sampling decision maker (_dd.p.dm) on trace chunks that do not contain the local root span.

Motivation

Keep sampling metadata consistent across trace chunks. Non-root trace chunks previously did not include _dd.p.dm, which led trace intake to classify the adaptive-sampled traces with the wrong ingestion_reason (i.e. defaulting to rule instead of adaptive_rule). This led to over-ingestion of traces when adaptive sampling was enabled.

Additional Notes

May be superseded by #12096

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@sarahchen6 sarahchen6 added type: feature Enhancements and improvements comp: core Tracer core tag: no release notes Changes to exclude from release notes labels Jul 28, 2026
@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jul 28, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 50.00%
Overall Coverage: 57.74% (+0.04%)

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

@dd-octo-sts

dd-octo-sts Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

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 14.05 s [-0.9%; +0.7%] (no difference)
startup:insecure-bank:tracing:Agent 12.93 s 13.06 s [-1.8%; -0.2%] (maybe better)
startup:petclinic:appsec:Agent 16.92 s 16.76 s [+0.1%; +1.8%] (maybe worse)
startup:petclinic:iast:Agent 16.83 s 16.89 s [-1.1%; +0.5%] (no difference)
startup:petclinic:profiling:Agent 16.51 s 16.72 s [-2.3%; -0.3%] (maybe better)
startup:petclinic:sca:Agent 16.90 s 16.82 s [-0.5%; +1.4%] (no difference)
startup:petclinic:tracing:Agent 16.09 s 16.03 s [-0.7%; +1.4%] (no difference)

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

@sarahchen6
sarahchen6 marked this pull request as ready for review July 28, 2026 21:48
@sarahchen6
sarahchen6 requested a review from a team as a code owner July 28, 2026 21:48

@datadog-prod-us1-6 datadog-prod-us1-6 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

The changed write path copies the local root decision maker only onto the first span of a separately exported chunk, after sampling succeeds and before serialization. Propagation-tag locking and pending-trace ordering match that intent, and no diff-only behavioral regression was identified; execution was limited by the unavailable Java 25 toolchain.

Was this helpful? React 👍 or 👎

Open Bits AI session

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

@sarahchen6 sarahchen6 removed the tag: no release notes Changes to exclude from release notes label Jul 28, 2026
@sarahchen6
sarahchen6 marked this pull request as draft July 28, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant