Skip to content

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

Open
dougqh wants to merge 2 commits into
masterfrom
dougqh/rc-dsm-tracer-tags
Open

dougqh wants to merge 2 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 DD_SPAN_TAGS when remote config overrides tracing tags (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: 59.47% (-0.37%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3b8dd31 | 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 13.90 s 13.86 s [-0.5%; +1.0%] (no difference)
startup:insecure-bank:tracing:Agent 12.81 s 12.92 s [-1.6%; -0.1%] (maybe better)
startup:petclinic:appsec:Agent 17.06 s 16.92 s [+0.0%; +1.7%] (maybe worse)
startup:petclinic:iast:Agent 16.83 s 16.96 s [-1.6%; +0.1%] (no difference)
startup:petclinic:profiling:Agent 16.21 s 16.85 s [-8.3%; +0.7%] (no difference)
startup:petclinic:sca:Agent 17.01 s 16.18 s [+0.9%; +9.3%] (maybe worse)
startup:petclinic:tracing:Agent 16.17 s 16.08 s [-0.3%; +1.4%] (no difference)

Commit: 3b8dd31a · 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

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: 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.

1 participant