Repository navigation
Conversation
Remote config tracing_tags now replaces only the global tags (DD_TAGS). Previously the dynamic config held DD_TAGS and DD_SPAN_TAGS merged, so an RC tag override also dropped DD_SPAN_TAGS until it was removed. ConfigSnapshot now keeps the global tags and the span defaults as separate frozen TagMaps, and builds mergedTracerTags from them (span defaults win, as before). Span defaults are DD_SPAN_TAGS, or the tags given to the builder's defaultSpanTags, and are no longer lost on the first RC tag change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Keeps the global tags (
DD_TAGS) apart from the span defaults (DD_SPAN_TAGS) in the tracer's config snapshot. Remote configtracing_tagsnow replaces only the global tags.Dynamic config:
tracingTagsnow holds only the global tags, seeded fromConfig.getGlobalTags(). The test-runner path,rebuildTraceConfig, already did this.Span defaults:
DD_SPAN_TAGS(newConfig.getSpanTags()), or the tags given to the builder'sdefaultSpanTags. Remote config never replaces these.ConfigSnapshot: keeps two frozen maps alongsidemergedTracerTags:globalTags: the global tags as given, or their RC override;spanDefaultTags: the span defaults plus the tracer-defined tags (env,_dd.dsm.enabled, …).mergedTracerTagsis built from both, with span defaults winning as before. Read-through and span semantics are unchanged.Motivation
DD_TAGSon the OTLP Resource without repeating them on every span, the exporter needs the global tags as their own set. Today it has to recover them by comparing values against the staticConfig. With this change, core can build the Resource fromglobalTagsand writespanDefaultTagson spans, taking both from the trace's snapshot (TraceCollector.getTraceConfig()). The Resource then also follows RC tag changes. The OTLP side is a follow-up and isn't included here.DD_SPAN_TAGS: the dynamic config heldDD_TAGS+DD_SPAN_TAGSmerged, so an RCtracing_tagsoverride replaced both. The span tags disappeared until the override was removed. See Add test for remote config tracing tags overriding DD_TAGS #12936 and the comment there.Behavior changes (release notes)
tracing_tagsoverride no longer dropsDD_SPAN_TAGS. This matches system-tests' stated intent ("local tags are overridden" refers toDD_TAGS). Pending confirmation from @mcculls on Add test for remote config tracing tags overriding DD_TAGS #12936, so this PR stays a draft until then.DDTracerdefaultSpanTags: explicit defaults are now the span-defaults level.DD_TAGSnow apply alongside them. Before, explicit defaults replaced the config tags at startup.env, dsm/djm) are now added at startup too. Before, they were only added after an RC tag change.Additional Notes
Config.getGlobalTags()already includesenvwhenDD_ENVis set, soglobalTagscan containenv. That's harmless for OTLP, whose Resource already ignoresenvamong the global tags.globalTags/spanDefaultTagsyet. The consumer is the Stop repeating global tags as OTLP span attributes #12813 rebuild.remoteConfigTracingTagsOverrideGlobalTagshas itsDD_SPAN_TAGSrow back;configSnapshotSeparatesGlobalTagsFromSpanDefaults;dd-trace-core(2,725 tests),ConfigTestanddd-trace-otall pass locally.Jira ticket: [PROJ-IDENT]
🤖 Generated with Claude Code