Skip to content

chore: upgrade @sentry/react-native from 7.x to 8.x #427

@hb2708

Description

@hb2708

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

  1. Install new version:
    npx expo install @sentry/react-native@latest
  2. Review Sentry.init() options — some fields have been renamed or removed in v8
  3. 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.
  4. Run clean prebuild after upgrading:
    npx expo prebuild --clean
  5. Check integration APIsreactNavigationIntegration, mobileReplayIntegration may have changed
  6. Test native crash reporting — build a release build and trigger a test crash
  7. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions