Skip to content

πŸ“ Fix propagateTraceBaggage TSDoc @defaultValue (false β†’ true) - #4933

Merged
BeltranBulbarellaDD merged 1 commit into
DataDog:mainfrom
yuandesu:fix/propagate-trace-baggage-tsdoc-default
Aug 11, 2026
Merged

πŸ“ Fix propagateTraceBaggage TSDoc @defaultValue (false β†’ true)#4933
BeltranBulbarellaDD merged 1 commit into
DataDog:mainfrom
yuandesu:fix/propagate-trace-baggage-tsdoc-default

Conversation

@yuandesu

@yuandesu yuandesu commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Motivation

The TSDoc @defaultValue for propagateTraceBaggage currently says false, but the actual default has been true since v7 (#4226 flipped the runtime default but did not update the doc comment).

This is confirmed by Datadog's own public v7 migration guide, which documents the default as true and its CORS implication:

"The propagateTraceBaggage initialization parameter defaults to true in v7... If you use distributed tracing on cross-origin requests, either set propagateTraceBaggage: false or add baggage to your Access-Control-Allow-Headers response headers: Access-Control-Allow-Headers: traceparent, tracestate, baggage"

Upgrade the RUM Browser SDK

The stale TSDoc contradicts this public documentation. Integrators who rely on the generated .d.ts / IDE autocomplete instead of reading the migration guide have no way to know the real default. This was surfaced via a customer support ticket.

Changes

One-line JSDoc fix in packages/browser-rum-core/src/domain/configuration/configuration.ts:

 /**
  * Whether to propagate user and account IDs in the baggage header of trace requests.
  *
  * @category Tracing
- * @defaultValue false
+ * @defaultValue true
  */
 propagateTraceBaggage?: boolean | undefined

No behavior change. Affects only the generated type declarations (.d.ts) shipped in future npm releases.

Test instructions

N/A, documentation-only change with no runtime behavior affected. The true default is already in effect via the existing default-resolution logic (propagateTraceBaggage: initConfiguration.propagateTraceBaggage !== false, unchanged since #4226).

Checklist

  • Tested locally β€” n/a, doc comment only
  • Tested on staging β€” n/a
  • Added unit tests for this change. β€” n/a, no behavior change
  • Added e2e/integration tests for this change. β€” n/a
  • Updated documentation and/or relevant AGENTS.md file β€” this PR is the doc fix itself

The TSDoc @DefaultValue for propagateTraceBaggage says false, but the
actual default has been true since v7 (DataDog#4226 flipped the runtime
default but did not update the doc comment).

This is confirmed by the public v7 migration guide, which documents
the default as true and its CORS implication:
https://docs.datadoghq.com/real_user_monitoring/guide/browser-sdk-upgrade/

Surfaced via a customer support ticket where the stale TSDoc led to
incorrect assumptions about default behavior.
@yuandesu
yuandesu requested a review from a team as a code owner August 7, 2026 05:04
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ βœ…
Posted by the CLA Assistant Lite bot.

@yuandesu

yuandesu commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@sbarrio
sbarrio requested a review from thomas-lebeau August 7, 2026 07:03
@BeltranBulbarellaDD
BeltranBulbarellaDD self-requested a review August 10, 2026 08:05
@BeltranBulbarellaDD

Copy link
Copy Markdown
Contributor

@yuandesu thanks for the contribution. Please wait until all CI has passed and then you will be able to merge.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 10, 2026

Copy link
Copy Markdown

Tests

πŸŽ‰ All green!

πŸ§ͺ All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
β€’ Patch Coverage: 100.00%
β€’ Overall Coverage: 77.15% (+0.00%)

This comment will be updated automatically if new data arrives.
πŸ”— Commit SHA: ef39b47 | Docs | Datadog PR Page | Give us feedback!

@yuandesu

yuandesu commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@BeltranBulbarellaDD Thank you for reviewing!
It seems I don't have the permission to merge this PR, could you please merge it?

Thanks!

@BeltranBulbarellaDD
BeltranBulbarellaDD merged commit 8a11b23 into DataDog:main Aug 11, 2026
31 of 32 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants