[RUM-15280] ✨ Expose DEFAULT_TRACKED_RESOURCE_HEADERS on RumPublicApi#4523
Merged
[RUM-15280] ✨ Expose DEFAULT_TRACKED_RESOURCE_HEADERS on RumPublicApi#4523
Conversation
Bundles Sizes Evolution
🚀 CPU PerformancePending... 🧠 Memory Performance
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: ad4e560 | Docs | Datadog PR Page | Give us feedback! |
thomas-lebeau
approved these changes
Apr 24, 2026
bcaudan
reviewed
Apr 24, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
48c4ff5 to
ad4e560
Compare
bcaudan
approved these changes
Apr 28, 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
Dogfooding feedback on
trackResourceHeaders: customers using the CDN bundle have no runtime access to the default header list, so they can't extend it (e.g.[...defaults, 'x-my-header']) without hardcoding. Named exports fromentries/main.tsreach NPM users but not thewindow.DD_RUMglobal, so the constant needs to be attached to the public API object itself.Changes
DEFAULT_TRACKED_RESOURCE_HEADERSas a property onRumPublicApi(marked@hiddenfor now), so CDN users can access it aswindow.DD_RUM.DEFAULT_TRACKED_RESOURCE_HEADERS.trackResourceHeadersJSDoc example inRumInitConfigurationto use...DEFAULT_TRACKED_RESOURCE_HEADERS.map((h) => ({ name: h }))instead of thename: (h) => ...includes(h)predicate form — matches how customers actually want to extend the defaults.Note: this introduces a non-function, non-state property on
RumPublicApifor the first time; every other member is either a method, aContextManager,initConfiguration, orversion.Test instructions
yarn build(oryarn dev).['cache-control', 'etag', 'age', 'expires', 'content-type', 'content-encoding', 'vary', 'content-length', 'server-timing', 'x-cache'].Checklist