Skip to content

✨ Add CDN default headers#4857

Merged
bdibon merged 1 commit into
mainfrom
boris.dibon/add-cdn-default-headers
Jul 10, 2026
Merged

✨ Add CDN default headers#4857
bdibon merged 1 commit into
mainfrom
boris.dibon/add-cdn-default-headers

Conversation

@bdibon

@bdibon bdibon commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Motivation

The RUM backend's shared-cache detection reads the x-cache, cf-cache-status, and x-vercel-cache response headers to flag cache_reason=shared_cache_hit. Only x-cache was collected by default, so Cloudflare and Vercel CDN traffic was invisible to that detection.

Changes

  • Added cf-cache-status and x-vercel-cache to DEFAULT_TRACKED_RESOURCE_HEADERS
  • Customers using trackResourceHeaders: true will now automatically collect these headers, no config change required on their end.

Test instructions

  • yarn test:unit --spec packages/browser-rum-core/src/domain/configuration/configuration.spec.ts — existing test asserting trackResourceHeaders: true resolves to DEFAULT_TRACKED_RESOURCE_HEADERS.map((name) => ({ name })) covers the updated list.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 178.25 KiB 178.29 KiB +35 B +0.02%
Rum Profiler 8.22 KiB 8.22 KiB 0 B 0.00%
Rum Recorder 21.14 KiB 21.14 KiB 0 B 0.00%
Logs 55.47 KiB 55.47 KiB 0 B 0.00%
Rum Slim 136.17 KiB 136.20 KiB +35 B +0.03%
Worker 22.96 KiB 22.96 KiB 0 B 0.00%

@datadog-datadog-us1-prod

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.26% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f7eacb4 | Docs | Datadog PR Page | Give us feedback!

@bdibon bdibon changed the title ✨ [RUM-17209] Add CDN default headers ✨ Add CDN default headers Jul 9, 2026
@bdibon bdibon marked this pull request as ready for review July 9, 2026 12:42
@bdibon bdibon requested a review from a team as a code owner July 9, 2026 12:42
@bdibon bdibon merged commit c93a383 into main Jul 10, 2026
33 of 35 checks passed
@bdibon bdibon deleted the boris.dibon/add-cdn-default-headers branch July 10, 2026 07:50
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 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.

3 participants