Skip to content

Releases: getsentry/sentry-react-native

8.0.0-alpha.0

29 Jan 16:10
4c2c1bc

Choose a tag to compare

8.0.0-alpha.0 Pre-release
Pre-release

Upgrading from 7.x to 8.0

Version 8 of the Sentry React Native SDK updates the underlying native SDKs (Cocoa v9, CLI v3, Android Gradle Plugin v6) which introduce breaking changes in minimum version requirements and build tooling.

See our migration docs for more information.

Breaking Changes

Minimum Version Requirements

  • iOS/macOS/tvOS: (#5356)

    • iOS 15.0+ (previously 11.0+)
    • macOS 10.14+ (previously 10.13+)
    • tvOS 15.0+ (previously 11.0+)
  • Android: (#5578)

    • Sentry Android Gradle Plugin 6.0.0 (previously 5.x)
    • Android Gradle Plugin 7.4.0+ (previously 7.3.0+)
    • Kotlin 1.8+
  • Sentry Self-Hosted: (#5523)

    • Sentry CLI v3 requires self-hosted 25.11.1+ (previously 25.2.0)

Features

  • Capture App Start errors and crashes by initializing Sentry from sentry.options.json (#4472)

    Create sentry.options.json in the React Native project root and set options the same as you currently have in Sentry.init in JS.

    {
        "dsn": "https://[email protected]/value",
    }

    Initialize Sentry on the native layers by newly provided native methods.

    import io.sentry.react.RNSentrySDK
    
    class MainApplication : Application(), ReactApplication {
        override fun onCreate() {
            super.onCreate()
            RNSentrySDK.init(this)
        }
    }
    #import <RNSentry/RNSentry.h>
    
    @implementation AppDelegate
    - (BOOL)application:(UIApplication *)application
        didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        [RNSentrySDK start];
        return [super application:application didFinishLaunchingWithOptions:launchOptions];
    }
    @end
  • Add RNSentrySDK APIs support to @sentry/react-native/expo plugin (#4633)

    • Adds useNativeInit option to automatically initialize Sentry natively before JavaScript loads, enabling capture of app start errors
    {
      "expo": {
        "plugins": [
          [
            "@sentry/react-native/expo",
            {
              "useNativeInit": true
            }
          ]
        ]
      }
    }

Changes

  • Load optionsFile into the JS bundle during Metro bundle process (#4476)
  • Add experimental version of startWithConfigureOptions for Apple platforms (#4444)
  • Add experimental version of init with optional OptionsConfiguration<SentryAndroidOptions> for Android (#4451)
  • Add initialization using sentry.options.json for Apple platforms (#4447)
  • Add initialization using sentry.options.json for Android (#4451)
  • Merge options from file with Sentry.init options in JS (#4510)

Internal

  • Extract iOS native initialization to standalone structures (#4442)
  • Extract Android native initialization to standalone structures (#4445)

Dependencies

7.11.0

29 Jan 13:18

Choose a tag to compare

Features

  • Add support for applying scope attributes to JS logs (#5579)
  • Add experimental sentry-span-attributes prop to attach custom attributes to user interaction spans (#5569)
    <Pressable
      sentry-label="checkout"
      sentry-span-attributes={{
        'user.type': 'premium',
        'cart.value': 150
      }}
      onPress={handleCheckout}>
      <Text>Checkout</Text>
    </Pressable>

Dependencies

7.10.0

22 Jan 10:58

Choose a tag to compare

Fixes

  • Fixes Android incompatibility with Firebase dependencies (#5563)

Dependencies

7.9.0

16 Jan 12:50

Choose a tag to compare

Features

  • Experimental support of UI profiling on Android (#5518)
  • Expose iOS options to ignore views from subtree traversal (#5545)
    • Use includedViewClasses to only traverse specific view classes, or excludedViewClasses to skip problematic view classes during session replay and screenshot capture
    import * as Sentry from '@sentry/react-native';
    
    Sentry.init({
      replaysSessionSampleRate: 1.0,
      integrations: [
        Sentry.mobileReplayIntegration({
          includedViewClasses: ['UILabel', 'UIView', 'MyCustomView'],
          excludedViewClasses: ['WKWebView', 'UIWebView'],
        }),
      ],
    });

Fixes

  • Fix duplicate error reporting on iOS with New Architecture (#5532)
  • Fix for missing replay_id from metrics (#5483)
  • Skip span ID check when standalone mode is enabled (#5493)
  • Fix traces not always being attached to replays with errors (#5538)

Dependencies

7.8.0 (Stable)

16 Dec 12:30

Choose a tag to compare

Features

  • Adds Metrics Beta (#5402)
  • Improves Expo Router integration to optionally include full paths to components instead of just component names (#5414)
  • Report slow and frozen frames as TTID/TTFD span data (#5419)
  • Report slow and frozen frames on spans created through the API (#5420)
  • Improve performance by adding caching to getReplayId (#5449)

Fixes

  • Fix Object.freeze type pollution from @sentry-internal/replay (#5408)

Dependencies

7.7.0 (Stable)

24 Nov 14:35
651d671

Choose a tag to compare

Features

  • Added logsOrigin to Sentry Options (#5354)
    • You can now choose which logs are captured: 'native' for logs from native code only, 'js' for logs from the JavaScript layer only, or 'all' for both layers.
    • Takes effect only if enableLogs is true and defaults to 'all', preserving previous behavior.
  • Add beforeErrorSampling callback to mobileReplayIntegration (#5393)

Fixes

  • Preserves interaction span context during app restart to allow proper replay capture (#5386)
  • Discard empty Route Change transactions (#5387)

Dependencies

7.6.0

11 Nov 08:27

Choose a tag to compare

Fixes

  • Android SDK not being disabled when options.enabled is set to false (#5334)
  • Fixes how bundle IDs are getting defined for individual bundles (#5342)

Dependencies

7.5.0

04 Nov 15:48

Choose a tag to compare

Features

  • Adds GraphQL integration (#5299)
  • Adds Supabase integration (#5296)
  • Add new experimental Canvas Capture Strategy for Session Replay (#5301)
    • A new screenshot capture strategy that uses Android's Canvas API for more accurate and reliable text and image masking
    • Any .drawText() or .drawBitmap() calls are replaced by rectangles, ensuring no text or images are present in the resulting output
    • Note: If this strategy is used, all text and images will be masked, regardless of any masking configuration
    • To enable this feature, set the screenshotStrategy to canvas:
      import * as Sentry from '@sentry/react-native';
      
      Sentry.init({
        integrations: [
          Sentry.mobileReplayIntegration({
            screenshotStrategy: 'canvas',
          }),
        ],
      });

Fixes

  • Fixes orientation change misalignment for session replay on Android (#5321)
  • Sync user.geo from SetUser to the native layer (#5302)

Dependencies

7.4.0 (Stable)

17 Oct 13:21

Choose a tag to compare

Features

  • Adds Console logs as Sentry Logs. (#5261)
  • Adds support for propagateTraceparent (#5277)

Fixes

  • Fix compatibility with react-native-legal (#5253)
    • The licenses json file is correctly generated and placed into the res/ folder now
  • Handle missing shouldAddToIgnoreList callback in Metro (#5260)
  • Overrides the default Cocoa SDK behavior that disables Session Replay on iOS 26.0 (#5268)

Dependencies

7.3.0

09 Oct 09:41

Choose a tag to compare

Features

  • Adds support for Gradle 9 (#5233)

Fixes

  • Updates sentry-xcode.sh and the default settings for the project.pbxproj to fix the issue with escape patterns in Xcode that leaded to errors during "Bundle React Native code and images" stage (#5221)
  • Fixes .env file loading in Expo sourcemap uploads (#5210)
  • Fixes the issue with changing immutable metadata structure in the contructor of ReactNativeClient. This structure is getting re-created instead of being modified to ensure IP address is only inferred by Relay if sendDefaultPii is true (#5202)
  • Removes usage of deprecated SafeAreaView (#5241)
  • Fixes session replay recording for uncaught errors (#5243)
  • Fixes TypeScript errors when using custom Metro configurations with Expo SDK 54 (#5246)

Dependencies