Releases: getsentry/sentry-react-native
6.0.0-beta.1
Features
- Add
sentry.originto SDK spans to indicated if spans are created by a part of the SDK or manually (#4066)
Changes
- Set
parentSpanIsAlwaysRootSpantotrueto make parent of network requests predictable (#4084) - Remove deprecated
enableSpotlightandspotlightSidecarUrl(#4086) tracePropagationTargetsdefaults to all targets on mobile and same origin on the web (#4083)- Move
_experiments.profilesSampleRatetoprofilesSampleRateroot options object #3851)
Dependencies
5.32.0
Features
-
Exclude Sentry Web Replay, reducing the code in 130KB. (#4006)
- You can keep Sentry Web Replay by setting
includeWebReplaytotruein your metro config as shown in the snippet:
// For Expo const { getSentryExpoConfig } = require("@sentry/react-native/metro"); const config = getSentryExpoConfig(__dirname, { includeWebReplay: true }); // For RN const { getDefaultConfig } = require('@react-native/metro-config'); const { withSentryConfig } = require('@sentry/react-native/metro'); module.exports = withSentryConfig(getDefaultConfig(__dirname), { includeWebReplay: true });
- You can keep Sentry Web Replay by setting
Changes
- Add Android Logger when new frame event is not emitted (#4081)
- React Native Tracing Deprecations (#4073)
new ReactNativeTracingtoreactNativeTracingIntegration()new ReactNavigationInstrumentationtoreactNavigationIntegration().new ReactNativeNavigationInstrumentationtoreactNativeNavigationIntegration().ReactNavigationV4Instrumentationwon't be supported in the next major SDK version, upgrade toreact-navigation@5or newer.RoutingInstrumentationandRoutingInstrumentationInstancereplace byIntegrationinterface from@sentry/types.enableAppStartTracking,enableNativeFramesTracking,enableStallTracking,enableUserInteractionTracingmoved toSentry.init({})root options.
Dependencies
6.0.0-beta.0
This is a beta 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).
Major Changes
-
React Native Tracing options were moved to the root options
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>; }
-
Removed
beforeNavigateusebeforeStartSpaninstead (#3998)beforeStartSpanis executed before the span start, compared tobeforeNavigatewhich was executed before the navigation ended (after the span was created)
Dependencies
Other Changes
-
Native Frames uses
spanIdto attach frames replacingtraceId(#4030) -
Removed deprecated ReactNativeTracing option
idleTimeoutuseidleTimeoutMsinstead (#3998) -
Removed deprecated ReactNativeTracing option
maxTransactionDurationusefinalTimeoutMsinstead (#3998) -
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.
-
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 }) ], });
6.0.0-alpha.2
- Only internal changes. No SDK changes.
6.0.0-alpha.1
5.31.1 (Stable)
5.31.0
5.30.0
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
spotlightoption (#4023)- Deprecating
enableSpotlightandspotlightSidecarUrl
- Deprecating
Dependencies
6.0.0-alpha.0
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
idleTimeoutuseidleTimeoutMsinstead (#3998) -
Removed deprecated ReactNativeTracing option
maxTransactionDurationusefinalTimeoutMsinstead (#3998) -
Removed
beforeNavigateusebeforeStartSpaninstead (#3998)beforeStartSpanis executed before the span start, compared tobeforeNavigatewhich 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
spotlightoption (#4023)- Deprecating
enableSpotlightandspotlightSidecarUrl
- Deprecating
Dependencies
5.29.0
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
TimeToInitialDisplayandTimeToFullDisplaystart 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
datatype is plain JS object, otherwise the data might be lost.
- The expected
- Fix
requireNativeComponentmissing inreact-native-web(#3958)