Skip to content

Releases: getsentry/sentry-react-native

6.17.0

10 Jul 08:35
Compare
Choose a tag to compare

Features

  • Add experimental flag enableUnhandledCPPExceptionsV2 on iOS (#4975)

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

Dependencies

6.16.1

01 Jul 12:46
Compare
Choose a tag to compare

Fixes

  • Fixes Replay Custom Masking issue on Android (#4957)

Dependencies

7.0.0-beta.1

25 Jun 08:09
0cafc63
Compare
Choose a tag to compare
7.0.0-beta.1 Pre-release
Pre-release

Upgrading from 6.x to 7.0

Version 7 of the Sentry React Native SDK primarily introduces API cleanup and version support changes based on the Sentry Javascript SDK version 9. This update contains behavioral changes that will not be caught by type checkers, linters, or tests, so we recommend carefully reading through the entire migration guide instead of relying on automatic tooling.

Version 7 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or higher (unchanged from v6). Lower versions may continue to work, but may not support all features.

Major Changes

  • Set {{auto}} if user.ip_address is undefined and sendDefaultPii: true (#4466)
  • Sentry.captureUserFeedback removed, use Sentry.captureFeedback instead (#4855)

Major Changes from Sentry JS SDK v9

  • Exceptions from captureConsoleIntegration are now marked as handled: true by default
  • shutdownTimeout moved from core to @sentry/react-native
  • hasTracingEnabled was renamed to hasSpansEnabled
  • You can no longer drop spans or return null on beforeSendSpan hook
  • Fork scope if custom scope is passed to startSpanManual or startSpan

Removed types

  • TransactionNamingScheme
  • Request
  • Scope (prefer using the Scope class)

Other removed items.

  • autoSessionTracking from options.
    To enable session tracking, ensure that enableAutoSessionTracking is enabled.
  • enableTracing. Instead, set tracesSampleRate to a value greater than zero to enable tracing, 0 to keep tracing integrations active without sampling, or undefined to disable the performance integration.
  • getCurrentHub(), Hub, and getCurrentHubShim()
  • spanId from propagation context
  • metrics API
  • transactionContext from samplingContext
  • @sentry/utils package, the exports were moved to @sentry/core
  • Standalone Client interface & deprecate BaseClient

Features

  • Add experimental support for Log tracing (#4827)

To enable it add the following code to your Sentry Options:

Sentry.init({
  // other options...
  _experiments: {
    enableLogs: true,
  },
});

You can also filter the logs being collected by adding beforeSendLogs into _experiments

Sentry.init({
  // other options...
  _experiments: {
    enableLogs: true,
    beforeSendLog: (log) => {
      return log;
    },
  }
});

Changes

  • Expose logger and consoleLoggingIntegration (#4930)
  • Remove deprecated appOwnership constant use in Expo Go detection (#4893)
  • Disable AppStart and NativeFrames in unsupported environments (web, Expo Go) (#4897)

Self Hosted

  • It is recommended to use Sentry Self Hosted version 25.2.0 or new for React Native V7 or newer

Dependencies

6.16.0

24 Jun 16:11
Compare
Choose a tag to compare

Features

  • Introducing @sentry/react-native/playground (#4916)

    The new withSentryPlayground component allows developers to verify
    that the SDK is properly configured and reports errors as expected.

    import * as Sentry from '@sentry/react-native';
    import { withSentryPlayground } from '@sentry/react-native/playground';
    
    function App() {
      return <View>...</View>;
    }
    
    export default withSentryPlayground(
      Sentry.wrap(App)
    );

Fixes

  • Adds support for React Native 0.80 (#4938)
  • Report slow and frozen frames as app start span data (#4865)
  • User set by Sentry.setUser is prefilled in Feedback Widget (#4901)
    • User data are considered from all scopes in the following order current, isolation and global.

6.15.1 (Stable)

10 Jun 13:58
Compare
Choose a tag to compare

Dependencies

7.0.0-beta.0

05 Jun 12:59
Compare
Choose a tag to compare
7.0.0-beta.0 Pre-release
Pre-release

Upgrading from 6.x to 7.0

Version 7 of the Sentry React Native SDK primarily introduces API cleanup and version support changes based on the Sentry Javascript SDK version 9. This update contains behavioral changes that will not be caught by type checkers, linters, or tests, so we recommend carefully reading through the entire migration guide instead of relying on automatic tooling.

Version 7 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or higher (unchanged from v6). Lower versions may continue to work, but may not support all features.

Major Changes

  • Set {{auto}} if user.ip_address is undefined and sendDefaultPii: true (#4466)
  • Sentry.captureUserFeedback removed, use Sentry.captureFeedback instead (#4855)

Major Changes from Sentry JS SDK v9

  • Exceptions from captureConsoleIntegration are now marked as handled: true by default
  • shutdownTimeout moved from core to @sentry/react-native
  • hasTracingEnabled was renamed to hasSpansEnabled
  • You can no longer drop spans or return null on beforeSendSpan hook
  • Fork scope if custom scope is passed to startSpanManual or startSpan

Removed types

  • TransactionNamingScheme
  • Request
  • Scope (prefer using the Scope class)

Other removed items.

  • autoSessionTracking from options.
    To enable session tracking, ensure that enableAutoSessionTracking is enabled.
  • enableTracing. Instead, set tracesSampleRate to a value greater than zero to enable tracing, 0 to keep tracing integrations active without sampling, or undefined to disable the performance integration.
  • getCurrentHub(), Hub, and getCurrentHubShim()
  • spanId from propagation context
  • metrics API
  • transactionContext from samplingContext
  • @sentry/utils package, the exports were moved to @sentry/core
  • Standalone Client interface & deprecate BaseClient

Changes

  • Use Replay interface for browserReplayIntegration return type (#4858)
  • Allow using browserReplayIntegration without isWeb guard (#4858)
    • The integration returns noop in non-browser environments
  • Use single encodeUTF8 implementation through the SDK (#4885)
  • Use global TextEncoder (available with Hermes in React Native 0.74 or higher) to improve envelope encoding performance. (#4874)
  • breadcrumbsIntegration disables React Native incompatible options automatically (#4886)
  • On React Native Web, browserSessionIntegration is added when enableAutoSessionTracking is set to True (#4732)
  • Change Cold/Warm App Start span description to Cold/Warm Start (#4636)

Dependencies

6.15.0

04 Jun 09:38
Compare
Choose a tag to compare

Features

  • User Feedback Widget Updates

    • FeedbackButton for easy access to the widget (#4378)
    • ScreenshotButton for capturing the application visuals (#4714)
    • Theming support to better align with the application styles (#4677)
    Sentry.init({
      integrations: [
        Sentry.feedbackIntegration({
          enableTakeScreenshot: true, // Enables `ScreenshotButton`
          themeDark: {
            // Add dark theme styles here
          },
          themeLight: {
            // Add light theme styles here
          },
        }),
      ],
    });
    
    Sentry.showFeedbackButton();
    Sentry.hideFeedbackButton();

    To learn more visit the documentation.

  • Re-export ErrorEvent and TransactionEvent types (#4859)

Fixes

  • crashedLastRun now returns the correct value (#4829)
  • Use engine-specific promise rejection tracking (#4826)
  • Fixes Feedback Widget accessibility issue on iOS (#4739)
  • Measuring TTID or TTFD could cause a crash when parentSpanId was removed (#4881)

Dependencies

6.14.0

15 May 09:39
Compare
Choose a tag to compare

Fixes

  • Expo Updates Context is passed to native after native init to be available for crashes (#4808)
  • Expo Updates Context values should all be lowercase (#4809)
  • Avoid duplicate network requests (fetch, xhr) by default (#4816)
    • traceFetch is disabled by default on mobile as RN uses a polyfill which will be traced by traceXHR

Changes

  • Renames enableExperimentalViewRenderer to enableViewRendererV2 which is enabled by default for up to 5x times more performance in Session Replay on iOS (#4815)

Dependencies

7.0.0-alpha.0

12 May 08:43
Compare
Choose a tag to compare
7.0.0-alpha.0 Pre-release
Pre-release

Upgrading from 6.x to 7.0

Version 7 of the Sentry React Native SDK primarily introduces API cleanup and version support changes based on the Sentry Javascript SDK version 9. This update contains behavioral changes that will not be caught by type checkers, linters, or tests, so we recommend carefully reading through the entire migration guide instead of relying on automatic tooling.

Version 7 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or higher (unchanged from v6). Lower versions may continue to work, but may not support all features.

Fixes

  • Expo Updates Context is passed to native after native init to be available for crashes (#4808)
  • Expo Updates Context values should all be lowercase (#4809)
  • Avoid duplicate network requests (fetch, xhr) by default (#4816)
    • traceFetch is disabled by default on mobile as RN uses a polyfill which will be traced by traceXHR

Major Changes

  • Set {{auto}} if user.ip_address is undefined and sendDefaultPii: true (#4466)
  • Exceptions from captureConsoleIntegration are now marked as handled: true by default
  • shutdownTimeout moved from core to @sentry/react-native
  • hasTracingEnabled was renamed to hasSpansEnabled
  • You can no longer drop spans or return null on beforeSendSpan hook

Removed types

  • TransactionNamingScheme
  • Request
  • Scope (prefer using the Scope class)

Other removed items.

  • autoSessionTracking from options.
    To enable session tracking, ensure that enableAutoSessionTracking is enabled.
  • enableTracing. Instead, set tracesSampleRate to a value greater than zero to enable tracing, 0 to keep tracing integrations active without sampling, or undefined to disable the performance integration.
  • getCurrentHub(), Hub, and getCurrentHubShim()
  • spanId from propagation context
  • metrics API
  • transactionContext from samplingContext
  • @sentry/utils package, the exports were moved to @sentry/core
  • Standalone Client interface & deprecate BaseClient

Other Changes

  • Fork scope if custom scope is passed to startSpanManual or startSpan
  • On React Native Web, browserSessionIntegration is added when enableAutoSessionTracking is set to True (#4732)
    Change Cold/Warm App Start span description to Cold/Warm Start (#4636)

Dependencies

6.13.1 (Stable)

05 May 15:12
Compare
Choose a tag to compare

Fixes

  • Disable native driver for Feedback Widget backgroundColor animation in unsupported React Native versions (#4794)
  • Fix Debug Symbolicator for local development builds (use RN 0.79 default exports) (#4801)