@sentry/react-native
Advanced tools
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)Changelog
5.19.1
authToken
to application bundle (#3630)
SENTRY_AUTH_TOKEN
env variable, as pointed out in our docs.authToken
from the plugin config if it was set.Changelog
5.19.0
This release contains upgrade of sentry-android
dependency to major version 7. There are no breaking changes in the JS API. If you are using the Android API please check the migration guide.
Add Android profiles to React Native Profiling (#3397)
Add Sentry.metrics
(#3590)
To learn more, see the Set Up Metrics guide.
import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: '___DSN___',
integrations: [
Sentry.metrics.metricsAggregatorIntegration(),
],
});
Sentry.metrics.increment("button_click", 1, {
tags: { system: "iOS", app_version: "1.0.0" },
});
node
not found in WITH_ENVIRONMENT
(#3573)proguardUuid
loading on Android (#3591)Changelog
5.18.0
Add @spotlightjs/spotlight
support (#3550)
Download the Spotlight
desktop application and add the integration to your Sentry.init
.
import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: '___DSN___',
enableSpotlight: __DEV__,
});
Only upload Expo artifact if source map exists (#3568)
Read .env
file in sentry-expo-upload-sourcemaps
(#3571)
Changelog
5.17.0
New Sentry Metro configuration function withSentryConfig
(#3478)
createSentryMetroSerializer
const { getDefaultConfig } = require('@react-native/metro-config');
const { withSentryConfig } = require('@sentry/react-native/metro');
const config = getDefaultConfig(__dirname);
module.exports = withSentryConfig(config);
Add experimental visionOS support (#3467)
react-native-visionos
with the Sentry React Native SDK follow the standard iOS
guides.visionos
folder instead of ios
.WITH_ENVIRONMENT
overwrite in sentry-xcode-debug-files.sh
(#3525)$NODE_BINARY
to execute Sentry CLI in Xcode scripts (#3493)