Skip to content

fix(sdk-crash): Match RN fetch instrumentation in any package layout - #130885

Merged
antonis merged 2 commits into
masterfrom
antonis/sdk-crash-rn-fetch-any-layout
Nov 12, 2026
Merged

antonis merged 2 commits into
masterfrom
antonis/sdk-crash-rn-fetch-any-layout

Conversation

@antonis

@antonis antonis commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #110735 and #120646.

The React Native fetch pass-through ignore matchers were anchored at @sentry/core/, so SDK-CRASHES-REACT-NATIVE-F7 keeps receiving user network errors (Failed to fetch via onunhandledrejection) whenever the original module has a prefix:

  • pnpm: .pnpm/@sentry+core@x/node_modules/@sentry/core/...
  • nested copies: @sentry/{react-native,browser,react}/node_modules/@sentry/core/...
  • bundler prefixes: node_modules/@sentry/core/...
  • older SDKs: @sentry/utils/esm/instrument/fetch

High-volume releases on the plain layout stopped after #120646; these layouts account for the remaining events.

Changes

  • Prefix the module patterns with * and add the same two matchers for @sentry/utils.
  • Scope is unchanged: only the fetch and <anonymous> pass-through frames, and only when they are the first SDK frame. Other functions in the module (instrumentFetch, parseFetchArgs) and other instrumentation (xhr) stay detectable.
  • Tests cover each observed layout plus negative cases.

🤖 Generated with Claude Code

The fetch pass-through ignore matchers were anchored at `@sentry/core/`,
so pnpm, nested @sentry/core copies, bundler-prefixed modules and the
older @sentry/utils location still reported user network errors as SDK
crashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 12, 2026
@antonis
antonis marked this pull request as ready for review November 12, 2026 09:15
@antonis
antonis requested a review from a team as a code owner November 12, 2026 09:15
@antonis
antonis requested review from alwx and itaybre November 12, 2026 09:15
@antonis
antonis enabled auto-merge (squash) November 12, 2026 09:41
@antonis
antonis merged commit 1045910 into master Nov 12, 2026
72 checks passed
@antonis
antonis deleted the antonis/sdk-crash-rn-fetch-any-layout branch November 12, 2026 09:46

This branch was successfully deployed

1 active deployment
Preview — 2c40e6c2 Deployed Nov 12, 2026 by vercel[bot]
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