Summary
Upgrade @sentry/react-native from 7.11.0 to 8.x. This is a major SDK rewrite with improved performance, new APIs, and breaking changes to initialization and configuration.
Current → Target
| Package |
Current |
Latest |
@sentry/react-native |
~7.11.0 |
8.x |
Why Upgrade
- v8 includes significant performance improvements for mobile
- Better session replay support
- Improved source map handling
- New logging API (
Sentry.logger.*)
- More reliable native crash capture
Migration Steps
- Install new version:
npx expo install @sentry/react-native@latest
- Review
Sentry.init() options — some fields have been renamed or removed in v8
- Update the Expo config plugin — currently using
@sentry/react-native/expo in app.config.js:
["@sentry/react-native/expo", {
"organization": process.env.SENTRY_ORG || "nmf",
"project": process.env.SENTRY_PROJECT || "nmf-earth",
}]
Verify this plugin format is still valid for v8.
- Run clean prebuild after upgrading:
npx expo prebuild --clean
- Check integration APIs —
reactNavigationIntegration, mobileReplayIntegration may have changed
- Test native crash reporting — build a release build and trigger a test crash
- Run
yarn ci to verify JS-side changes
Files Likely Affected
App.tsx — Sentry initialization
app.config.js — Expo config plugin entry
ios/sentry.properties / android/sentry.properties — may be regenerated by prebuild
References
Summary
Upgrade
@sentry/react-nativefrom 7.11.0 to 8.x. This is a major SDK rewrite with improved performance, new APIs, and breaking changes to initialization and configuration.Current → Target
@sentry/react-nativeWhy Upgrade
Sentry.logger.*)Migration Steps
Sentry.init()options — some fields have been renamed or removed in v8@sentry/react-native/expoinapp.config.js:reactNavigationIntegration,mobileReplayIntegrationmay have changedyarn cito verify JS-side changesFiles Likely Affected
App.tsx— Sentry initializationapp.config.js— Expo config plugin entryios/sentry.properties/android/sentry.properties— may be regenerated by prebuildReferences