Skip to content

fix(sdk-crash): Exclude React Native fetch instrumentation from SDK crash detection#110735

Merged
antonis merged 1 commit intomasterfrom
antonis/rn-fetch-exclusion
Mar 16, 2026
Merged

fix(sdk-crash): Exclude React Native fetch instrumentation from SDK crash detection#110735
antonis merged 1 commit intomasterfrom
antonis/rn-fetch-exclusion

Conversation

@antonis
Copy link
Contributor

@antonis antonis commented Mar 16, 2026

Summary

  • Adds an ignore matcher for the Sentry JS SDK's fetch instrumentation wrapper in React Native SDK crash detection
  • The fetch instrumentation wraps globalThis.fetch as a pass-through; when a user's fetch call fails (e.g., "Failed to fetch" network errors), the SDK wrapper frame appears in the stack but is not the cause
  • Adds parametrized tests covering ESM/CJS builds, different function names, and different modules to ensure the pattern is precise

Test plan

  • Verify test_fetch_instrumentation_not_detected parametrized tests pass

…rash detection

The Sentry JS SDK's fetch instrumentation wraps globalThis.fetch as a
pass-through. When a user's fetch call fails (e.g., network errors),
the SDK wrapper frame appears in the stack but is not the root cause.
This adds an ignore matcher so these frames are not falsely reported
as SDK crashes.
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 16, 2026
@antonis antonis marked this pull request as ready for review March 16, 2026 12:51
@antonis antonis merged commit 03b0ad3 into master Mar 16, 2026
61 checks passed
@antonis antonis deleted the antonis/rn-fetch-exclusion branch March 16, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants