feat(tracing): Track wrapExpoRouterErrorBoundary adoption#6425
Merged
Conversation
Register a no-op `GlobalErrorBoundary` integration when the component mounts so the name flows through to `event.sdk.integrations` — the same channel used for feature- adoption signals like `MobileFeedback` and `AppStart`. Also introduces a shared `registerFeatureMarker` helper. Subsequent markers for other opt-in features (NavigationContainer, ExpoRouter error boundary, AppLoaded, ...) will use this helper — see #6415. Refs: #6415
Register a no-op `ExpoRouterErrorBoundary` integration when the wrapped Expo Router error boundary mounts so the name flows through to `event.sdk.integrations`. Refs: #6415
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
|
The wrapped boundary only mounts when Expo Router actually renders it (i.e., on an error), so a `useEffect`-based marker would undercount adoption for apps that ship the wrap but never hit a route error. Registering at wrap-call time fires as soon as the user's route file evaluates. No client is present if the wrap is called before `Sentry.init()`, but that is very rare in practice — Expo Router lazy-loads route files during navigation, so init has typically completed by then.
📲 Install BuildsAndroid
|
Contributor
iOS (new) Performance metrics 🚀
|
Contributor
iOS (legacy) Performance metrics 🚀
|
Base automatically changed from
feat/track-global-error-boundary-adoption
to
main
July 10, 2026 06:08
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type of change
Description
Registers a no-op
ExpoRouterErrorBoundaryintegration when the user callsSentry.wrapExpoRouterErrorBoundary(...)(i.e., at module-evaluation time of the route file that uses the wrap), so the name flows through toevent.sdk.integrations. Covers both manual usage and code emitted by the Babel auto-wrap plugin — both paths ultimately callwrapExpoRouterErrorBoundaryand share this marker.Motivation and Context
Part of #6415. The wrap adds route-scoped context to boundary errors, but nothing about the emitted event distinguishes "wrap installed" from "user's global handler caught it" today. Same pattern as
feedback/lazy.tsand PR #6421.The registration fires at wrap-call time rather than on the mount of the wrapped boundary, so we count "wrap installed" (not just "wrap engaged with an error"). Expo Router lazy-loads route files during navigation, so
Sentry.init()has typically completed by the time the wrap runs — if not,registerFeatureMarkersilently no-ops.How did you test it?
test/tracing/expoRouterErrorBoundary.test.tsxasserting the marker is registered synchronously at wrap-call time (before any component mount).Checklist
sdk.integrationsmarkers #6415)Base
Stacked on top of #6421. When #6421 merges, GitHub will automatically retarget this PR to
main.Refs: #6415