@sentry/react-native
Advanced tools
Changelog
5.23.0-alpha.1
replaysSessionSampleRate
option to Android (#3714)Access to Mobile Replay is limited to early access orgs on Sentry. If you're interested, sign up for the waitlist
Changelog
5.23.0-alpha.0
Mobile Session Replay Alpha (#3714)
To enable Replay for React Native on mobile and web add the following options.
Sentry.init({
_experiments: {
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
},
});
To change the default Mobile Replay options add the mobileReplayIntegration
.
Sentry.init({
_experiments: {
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
},
integrations: [
Sentry.mobileReplayIntegration({
maskAllText: true,
maskAllImages: true,
}),
],
});
Access is limited to early access orgs on Sentry. If you're interested, sign up for the waitlist
Changelog
5.21.0
getDefaultConfig
option to getSentryExpoConfig
(#3690)beforeScreenshot
option to ReactNativeOptions
(#3715)expo-router
static routes generation (#3730).end()
span API (#3737)Changelog
5.20.0
Automatic tracing of time to initial display for react-navigation
(#3588)
When enabled the instrumentation will create TTID spans and measurements.
The TTID timestamp represent moment when the react-navigation
screen
was rendered by the native code.
const routingInstrumentation = new Sentry.ReactNavigationInstrumentation({
enableTimeToInitialDisplay: true,
});
Sentry.init({
integrations: [new Sentry.ReactNativeTracing({routingInstrumentation})],
});
Tracing of full display using manual API (#3654)
In combination with the react-navigation
automatic instrumentation you can record when
the application screen is fully rendered.
For more examples and manual time to initial display see the documentation.
function Example() {
const [loaded] = React.useState(false);
return <View>
<Sentry.TimeToFullDisplay record={loaded}>
<Text>Example content</Text>
</Sentry.TimeToFullDisplay>
</View>;
}
Changelog
5.19.2
enabled: false
ensures no events are sent (#3606)TurboModuleRegistry
should not be imported in web applications (#3610)