Skip to content

RUM-15423: Fix B3/B3multi propagation headers being silently dropped#3347

Merged
kikoveiga merged 2 commits into
developfrom
kikoveiga/RUM-15423/fix-datadog-tracer-property-names
Apr 9, 2026
Merged

RUM-15423: Fix B3/B3multi propagation headers being silently dropped#3347
kikoveiga merged 2 commits into
developfrom
kikoveiga/RUM-15423/fix-datadog-tracer-property-names

Conversation

@kikoveiga

@kikoveiga kikoveiga commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Create new TRACE_PROPAGATION_STYLE_EXTRACT & TRACE_PROPAGATION_STYLE_INJECT properties in DatadogTracingConstants.kt.
  • Deprecate incorrect and old PROPAGATION_STYLE_EXTRACT & PROPAGATION_STYLE_INJECT that are now unused.
  • Map B3 type to B3SINGLE as expected in dd-trace-java TracePropagationStyle. Otherwise, it would be silently converted to B3MULTI.
  • Add tests for all TracingHeaderType in TracingHeaderTypePropagationTest.kt.

After some set up in SampleApplication's GlobalDatadogTracer, DatadogInterceptor and TracingInterceptor, and using these new constants, we can see the headers are now used and captured with trackResourceHeaders:

B3 (Single)
image

B3Multi
image

Motivation

RUM-15423: DatadogTracerBuilderAdapter was writing properties with keys propagation.style.inject/extract, but Config.java reads trace.propagation.style.inject/extract here, causing a mismatch and fallback to default Datadog + TraceContext.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@kikoveiga
kikoveiga force-pushed the kikoveiga/RUM-15423/fix-datadog-tracer-property-names branch from 05e1c97 to 4823f88 Compare April 8, 2026 13:22
@kikoveiga
kikoveiga marked this pull request as ready for review April 8, 2026 13:24
@kikoveiga
kikoveiga requested review from a team as code owners April 8, 2026 13:24
ambushwork
ambushwork previously approved these changes Apr 8, 2026
@kikoveiga kikoveiga self-assigned this Apr 8, 2026
0xnm
0xnm previously approved these changes Apr 8, 2026

@0xnm 0xnm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add the test covering the issue.

@datadog-prod-us1-6

This comment has been minimized.

@codecov-commenter

codecov-commenter commented Apr 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.49%. Comparing base (9d2c010) to head (243d09f).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...roid/trace/internal/DatadogTracerBuilderAdapter.kt 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3347      +/-   ##
===========================================
- Coverage    71.52%   71.49%   -0.03%     
===========================================
  Files          946      947       +1     
  Lines        34916    34919       +3     
  Branches      5920     5921       +1     
===========================================
- Hits         24973    24963      -10     
- Misses        8272     8283      +11     
- Partials      1671     1673       +2     
Files with missing lines Coverage Δ
...tadog/android/trace/api/DatadogTracingConstants.kt 0.00% <ø> (ø)
...roid/trace/internal/DatadogTracerBuilderAdapter.kt 96.36% <83.33%> (-3.64%) ⬇️

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kikoveiga
kikoveiga dismissed stale reviews from 0xnm and ambushwork via acf38d6 April 8, 2026 16:05
@kikoveiga

Copy link
Copy Markdown
Contributor Author

It would be nice to add the test covering the issue.

Added, thank you! The test to inject B3 single header was failing, so managed to find the deeper issue related with dd-trace-java as explained in the PR description.

@kikoveiga
kikoveiga requested review from 0xnm and ambushwork April 8, 2026 16:06
@kikoveiga
kikoveiga force-pushed the kikoveiga/RUM-15423/fix-datadog-tracer-property-names branch from acf38d6 to 096e765 Compare April 8, 2026 16:10
@kikoveiga
kikoveiga force-pushed the kikoveiga/RUM-15423/fix-datadog-tracer-property-names branch from 096e765 to 243d09f Compare April 8, 2026 16:12
@kikoveiga
kikoveiga merged commit fd26815 into develop Apr 9, 2026
26 checks passed
@kikoveiga
kikoveiga deleted the kikoveiga/RUM-15423/fix-datadog-tracer-property-names branch April 9, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants