Skip to content

Fix stale _dd.dsm.enabled tag after remote config toggles Data Streams - #12939

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
dougqh/rc-dsm-tracer-tags
Oct 21, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
dougqh/rc-dsm-tracer-tags

Conversation

@dougqh

@dougqh dougqh commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Rebuilds the tracer-wide span tags (mergedTracerTags) when remote config enables or disables Data Streams Monitoring, not only when the tracing tags change.

Motivation

ConfigSnapshot reuses the previous snapshot's mergedTracerTags whenever the tracing tags are unchanged. But withTracerTags also reads isDataStreamsEnabled() to set or remove _dd.dsm.enabled. So an RC update that changes only data_streams_enabled (TracingConfigPoller) left _dd.dsm.enabled stale on every new span:

  • DSM enabled through RC: the tag stays missing;
  • DSM disabled through RC: the tag stays set.

The tag only corrected itself once some later RC update also changed the tracing tags.

Fix: also compare isDataStreamsEnabled() in the reuse check. It only runs when a snapshot is built (on RC updates), never per span.

Additional Notes

  • CoreTracerTest.remoteConfigDataStreamsToggleUpdatesTracerTags fails on master (expected: <1> but was: <null> after RC enables DSM) and passes with the fix.
  • Full dd-trace-core locally: the only failures were two Docker-based tests (no Docker locally) and two timing tests (DDAgentWriterCombinedTest, PendingTraceBufferTest). Both timing tests pass when rerun on their own.
  • Found by /perf-review on Keep global tags apart from span defaults in the config snapshot (OTLP trace/resource-level split) #12937. It touches the same ConfigSnapshot block, so whichever lands second needs a small rebase.

Jira ticket: [PROJ-IDENT]

🤖 Generated with Claude Code

dougqh and others added 2 commits October 19, 2026 16:09
ConfigSnapshot reused the previous mergedTracerTags whenever the tracing
tags were unchanged, but withTracerTags also depends on whether Data
Streams Monitoring is enabled. Enabling or disabling DSM through remote
config, without a tag change, left _dd.dsm.enabled stale on new spans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dougqh dougqh added type: bug fix Bug fix comp: core Tracer core comp: remote config Configuration at Runtime tag: ai generated Largely based on code generated by an AI or LLM labels Oct 19, 2026
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 61.43% (+1.57%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e4ee5d3 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Oct 19, 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.67 s 14.69 s [-1.1%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 13.57 s 13.66 s [-1.3%; +0.0%] (no difference)
startup:petclinic:appsec:Agent 17.73 s 17.55 s [-0.1%; +2.2%] (no difference)
startup:petclinic:iast:Agent 17.55 s 17.58 s [-0.9%; +0.6%] (no difference)
startup:petclinic:profiling:Agent 17.33 s 17.51 s [-2.2%; +0.1%] (no difference)
startup:petclinic:sca:Agent 17.67 s 17.56 s [-0.3%; +1.6%] (no difference)
startup:petclinic:tracing:Agent 16.64 s 16.73 s [-1.5%; +0.4%] (no difference)

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

@dougqh
dougqh marked this pull request as ready for review October 19, 2026 21:11
@dougqh
dougqh requested a review from a team as a code owner October 19, 2026 21:11
@dougqh
dougqh requested review from anna-git and removed request for a team October 19, 2026 21:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-10-19T21:13:17.182143Z 3b8dd31 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-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 cache-reuse guard now accounts for DSM enablement, allowing remote-config updates to add or remove _dd.dsm.enabled even when tracing tags remain unchanged. The completed static review identified no reportable defects.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 3b8dd31

@dougqh
dougqh requested review from mcculls and mhlidd October 20, 2026 13:53

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

Nice catch

@dougqh
dougqh added this pull request to the merge queue Oct 21, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-21 12:02:57 UTC ℹ️ Start processing command /merge


2026-10-21 12:03:01 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-10-21 12:54:35 UTC ❌ MergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 76410f9:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
…r-tags

# Conflicts:
#	dd-trace-core/src/test/java/datadog/trace/core/CoreTracerTest.java
@dougqh
dougqh enabled auto-merge October 21, 2026 17:21
@dougqh
dougqh added this pull request to the merge queue Oct 21, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-21 18:14:39 UTC ℹ️ Start processing command /merge


2026-10-21 18:14:43 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-10-21 19:28:07 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 5b9d550 into master Oct 21, 2026
609 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the dougqh/rc-dsm-tracer-tags branch October 21, 2026 19:28
@github-actions github-actions Bot added this to the 1.68.0 milestone Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core comp: remote config Configuration at Runtime tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants