Skip to content

Propagate sampling metadata across trace chunks - #12092

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

Propagate sampling metadata across trace chunks#12092
sarahchen6 wants to merge 4 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

This comment has been minimized.

@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 13.98 s 13.94 s [-0.5%; +1.0%] (no difference)
startup:insecure-bank:tracing:Agent 12.88 s 13.05 s [-2.1%; -0.6%] (maybe better)
startup:petclinic:appsec:Agent 16.93 s 16.77 s [+0.0%; +1.8%] (maybe worse)
startup:petclinic:iast:Agent 16.96 s 16.89 s [-0.4%; +1.2%] (no difference)
startup:petclinic:profiling:Agent 16.78 s 16.84 s [-1.7%; +0.9%] (no difference)
startup:petclinic:sca:Agent 16.95 s 16.89 s [-0.7%; +1.4%] (no difference)
startup:petclinic:tracing:Agent 16.08 s 16.06 s [-0.8%; +1.0%] (no difference)

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

2 participants