Skip to content

Releases: getsentry/sentry-react-native

5.30.0

16 Aug 13:21
Compare
Choose a tag to compare

Warning

Due to a bug (getsentry/sentry-cocoa#4280) introduced in Sentry Cocoa 8.33.0, we deprecated this release and recommend upgrading to Sentry React Native SDK 5.31.0 or newer.

Features

  • Add spotlight option (#4023)
    • Deprecating enableSpotlight and spotlightSidecarUrl

Dependencies

6.0.0-alpha.0

14 Aug 11:12
3c48184
Compare
Choose a tag to compare
6.0.0-alpha.0 Pre-release
Pre-release

This is an alpha version of the next major version of the Sentry React Native SDK 6.0.0.
Please read the changes listed below as well as the changes made in the underlying
Sentry Javascript SDK 8.0.0 (JS Docs).

Changes

  • Removed deprecated ReactNativeTracing option idleTimeout use idleTimeoutMs instead (#3998)

  • Removed deprecated ReactNativeTracing option maxTransactionDuration use finalTimeoutMs instead (#3998)

  • Removed beforeNavigate use beforeStartSpan instead (#3998)

    • beforeStartSpan is executed before the span start, compared to beforeNavigate which was executed before the navigation ended (after the span was created)
  • New Native Frames Integration (#3996)

  • New Stall Tracking Integration (#3997)

  • New User Interaction Tracing Integration (#3999)

  • New App Start Integration (#3852)

    By default app start spans are attached to the first created transaction.
    Standalone mode creates single root span (transaction) including only app start data.

    import Sentry from '@sentry/react-native';
    
    Sentry.init({
      tracesSampleRate: 1.0,
      enableAppStartTracking: true, // default true
      enableNativeFramesTracking: true, // default true
      enableStallTracking: true, // default true
      enableUserInteractionTracing: true, // default false
      integrations: [
        Sentry.reactNativeTracingIntegration({
          beforeStartSpan: (startSpanOptions) => {
            startSpanOptions.name = 'New Name';
            return startSpanOptions;
          },
        }),
        Sentry.appStartIntegration({
          standalone: false, // default false
        }),
      ],
    });
  • New React Navigation Integration interface (#4003)

    import Sentry from '@sentry/react-native';
    import { NavigationContainer } from '@react-navigation/native';
    
    const reactNavigationIntegration = Sentry.reactNavigationIntegration();
    
    Sentry.init({
      tracesSampleRate: 1.0,
      integrations: [reactNavigationIntegration],
    });
    
    function RootComponent() {
      const navigation = React.useRef(null);
    
      return <NavigationContainer ref={navigation}
        onReady={() => {
          reactNavigationIntegration.registerNavigationContainer(navigation);
        }}>
      </NavigationContainer>;
    }
  • New React Native Navigation Integration interface (#4003)

    import Sentry from '@sentry/react-native';
    import { Navigation } from 'react-native-navigation';
    
    Sentry.init({
      tracesSampleRate: 1.0,
      integrations: [
        Sentry.reactNativeNavigationIntegration({ navigation: Navigation })
      ],
    });
  • Add spotlight option (#4023)

    • Deprecating enableSpotlight and spotlightSidecarUrl

Dependencies

5.29.0

14 Aug 08:13
Compare
Choose a tag to compare

Warning

Due to a bug (getsentry/sentry-cocoa#4280) introduced in Sentry Cocoa 8.33.0, we deprecated this release and recommend upgrading to Sentry React Native SDK 5.31.0 or newer.

Features

  • TimeToInitialDisplay and TimeToFullDisplay start the time to display spans on mount (#4020)

Fixed

  • fix(ttid): End and measure TTID regardless current active span (#4019)
    • Fixes possible missing TTID measurements and spans
  • Fix crash when passing array as data to Sentry.addBreadcrumb({ data: [] }) (#4021)
    • The expected data type is plain JS object, otherwise the data might be lost.
  • Fix requireNativeComponent missing in react-native-web (#3958)

Dependencies

5.28.0

09 Aug 08:48
Compare
Choose a tag to compare

Warning

Due to a bug (getsentry/sentry-cocoa#4280) introduced in Sentry Cocoa 8.33.0, we deprecated this release and recommend upgrading to Sentry React Native SDK 5.31.0 or newer.

Fixes

  • Support metro@0.80.10 new sourceMapString export (#4004)
  • Sentry.captureMessage stack trace is in event.exception (moved from event.threads) (#3635, #3988)
    • To revert to the old behavior (causing the stack to be unsymbolicated) use useThreadsForMessageStack option

Dependencies

5.27.0

05 Aug 09:38
Compare
Choose a tag to compare

Fixes

  • Pass sampleRate option to the Android SDK (#3979)
  • Drop app start data older than one minute (#3974)
  • Use Platform.constants.reactNativeVersion instead of react-native internal export (#3949)

Dependencies

5.26.0

15 Jul 21:32
Compare
Choose a tag to compare

Features

  • Session Replay Public Beta (#3830)

    To enable Replay use the replaysSessionSampleRate or replaysOnErrorSampleRate options.

    import * as Sentry from '@sentry/react-native';
    
    Sentry.init({
      _experiments: {
        replaysSessionSampleRate: 1.0,
        replaysOnErrorSampleRate: 1.0,
      },
    });

    To add React Component Names use annotateReactComponents in metro.config.js.

    // For Expo
    const { getSentryExpoConfig } = require("@sentry/react-native/metro");
    const config = getSentryExpoConfig(__dirname, { annotateReactComponents: true });
    
    // For RN
    const { getDefaultConfig } = require('@react-native/metro-config');
    const { withSentryConfig } = require('@sentry/react-native/metro');
    module.exports = withSentryConfig(getDefaultConfig(__dirname), { annotateReactComponents: true });

    To change default redaction behavior add the mobileReplayIntegration.

    import * as Sentry from '@sentry/react-native';
    
    Sentry.init({
      _experiments: {
        replaysSessionSampleRate: 1.0,
        replaysOnErrorSampleRate: 1.0,
      },
      integrations: [
        Sentry.mobileReplayIntegration({
          maskAllImages: true,
          maskAllVectors: true,
          maskAllText: true,
        }),
      ],
    });

    To learn more visit Sentry's Mobile Session Replay documentation page.

Dependencies

5.26.0-alpha.3

12 Jul 13:24
Compare
Choose a tag to compare
5.26.0-alpha.3 Pre-release
Pre-release

Features

  • Redact react-native-svg SVGs when maskAllVectors (#3930)

  • Add annotateReactComponents option to @sentry/react-native/metro (#3916)

    // For Expo
    const { getSentryExpoConfig } = require("@sentry/react-native/metro");
    const config = getSentryExpoConfig(__dirname, { annotateReactComponents: true });
    
    // For RN
    const { getDefaultConfig } = require('@react-native/metro-config');
    const { withSentryConfig } = require('@sentry/react-native/metro');
    module.exports = withSentryConfig(getDefaultConfig(__dirname), { annotateReactComponents: true });

Fixes

  • Add app.foreground/background breadcrumbs to iOS Replays (#3932)

Dependencies

5.25.0

09 Jul 12:24
Compare
Choose a tag to compare

Features

  • Improved Touch Event Breadcrumb components structure (#3899)
  • Set currentScreen on native scope (#3927)

Fixes

  • error.cause chain is locally symbolicated in development builds (#3920)
  • sentry-expo-upload-sourcemaps no longer requires Sentry url when uploading sourcemaps to sentry.io (#3915)
  • Flavor aware Android builds use SENTRY_AUTH_TOKEN env as fallback when token not found in sentry-flavor-type.properties. (#3917)
  • mechanism.handled:false should crash current session (#3900)

Dependencies

5.25.0-alpha.2

02 Jul 12:52
Compare
Choose a tag to compare
5.25.0-alpha.2 Pre-release
Pre-release

Features

Fixes

  • sentry-expo-upload-sourcemaps no longer requires Sentry url when uploading sourcemaps to sentry.io (#3915)

Dependencies

Access to Mobile Replay is limited to early access orgs on Sentry. If you're interested, sign up for the waitlist

5.24.1

18 Jun 08:11
Compare
Choose a tag to compare

Fixes

  • App Start Native Frames can start with zeroed values (#3881)

Dependencies