Skip to content

[RUM-17907] Add optional global Fetch resource tracking - #1360

Draft
cdn34dd wants to merge 1 commit into
developfrom
carlosnogueira/RUM-17907/expo-fetch-resource-tracking
Draft

[RUM-17907] Add optional global Fetch resource tracking#1360
cdn34dd wants to merge 1 commit into
developfrom
carlosnogueira/RUM-17907/expo-fetch-resource-tracking

Conversation

@cdn34dd

@cdn34dd cdn34dd commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds optional resource tracking for global Fetch implementations, including Expo Fetch, through the new trackFetchResources configuration option.

XHR instrumentation remains enabled independently so requests made through Axios or direct XMLHttpRequest calls continue to be tracked. The Fetch and XHR proxies coordinate to prevent duplicate resource events when the active Fetch implementation is itself backed by XHR.

Motivation

Expo Fetch can bypass the SDK’s existing XHR instrumentation, which means those network requests are currently missing from RUM resource tracking.

This change allows users to explicitly enable Fetch instrumentation while preserving the existing XHR coverage and avoiding duplicate events across different Fetch implementations.

Changes

  • Adds the optional trackFetchResources SDK configuration, disabled by default.
  • Adds a Fetch proxy that reports global Fetch requests as RUM resources.
  • Reuses the existing resource reporting, tracing, baggage, GraphQL, and filtering logic.
  • Keeps XHR instrumentation enabled for Axios and direct XHR requests.
  • Prevents duplicate events when the active Fetch implementation uses XHR internally.
  • Supports programmatic, automatic, and file-based SDK configuration.
  • Adds unit and integration coverage for Fetch tracking and Fetch/XHR coordination.
  • Documents the new configuration option and expected behavior.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • 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)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

Add trackFetchResources configuration to instrument Expo and other
global Fetch implementations while keeping XHR tracking  enabled.
Coordinate Fetch and XHR proxies to prevent duplicate events for
XHR-backed Fetch requests.
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.

1 participant