💥 enable propagateTraceBaggage by default#4226
Merged
BenoitZugmeyer merged 2 commits intov7from Feb 23, 2026
Merged
Conversation
Bundles Sizes Evolution
🚀 CPU PerformancePending... 🧠 Memory PerformancePending... |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 001e331 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
a01f4bf to
001e331
Compare
Comment on lines
+97
to
114
| createTest('do not propagate trace baggage when disabled') | ||
| .withRum({ | ||
| service: 'service', | ||
| allowedTracingUrls: ['LOCATION_ORIGIN'], | ||
| propagateTraceBaggage: false, | ||
| }) | ||
| .run(async ({ intakeRegistry, flushEvents, page }) => { | ||
| const rawHeaders = await page.evaluate(() => | ||
| window | ||
| .fetch('/headers') | ||
| .then((response) => response.text()) | ||
| .catch(() => new Error('Fetch request failed!')) | ||
| ) | ||
| const headers = parseHeaders(rawHeaders) | ||
| checkRequestHeaders(headers, { withBaggage: false }) | ||
| await flushEvents() | ||
| checkTraceAssociatedToRumEvent(intakeRegistry) | ||
| }) |
Collaborator
There was a problem hiding this comment.
❓ question: what happen when:
propagateTraceBaggage: trueand no user and account context set?propagateTraceBaggage: falseand user and account context is set
should we also test for these?
Member
Author
There was a problem hiding this comment.
propagateTraceBaggage: trueand no user and account context set?
This is already covered by various test cases, since propagateTraceBaggage: true is the default now. This assertion ensure the baggage header is set with the session id.
propagateTraceBaggage: falseand user and account context is set
I don't think we really need to test for it, since in this case the header should just not be present?
BeltranBulbarellaDD
approved these changes
Feb 23, 2026
thomas-lebeau
approved these changes
Feb 23, 2026
thomas-lebeau
approved these changes
Feb 24, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation
The
baggageheader propagates RUM session context (session ID, user ID, account ID) to backend services for distributed tracing correlation. Requiring customers to explicitly opt in creates unnecessary friction — it should be on by default, with an explicit opt-out for those who don't want it.Changes
configuration.ts: change default fromfalsetotrueby using!== falseinstead of!!tracer.spec.ts: update expected headers to includebaggageby default; usetoPlainObject()for theRequestcase to avoid alphabetical ordering sensitivitytracing.scenario.ts: update e2e scenarios — baggage is now expected incheckRequestHeadersby default, rename the old "propagate trace baggage" test to cover user/account specifically, add a new test forpropagateTraceBaggage: falseTest instructions
yarn dev, navigate tohttp://localhost:8080)allowedTracingUrls: ['https://httpbin.org'], service: 'sandbox'toDD_RUM.init()insandbox/index.htmlfetch('https://httpbin.org/headers').then(r => r.json()).then(j => console.log(j.headers))— verifyBaggage: session.id=...is presentpropagateTraceBaggage: false— reload and repeat — verifyBaggageis absentChecklist