Features
-
Session Replay Public Beta (#3830)
To enable Replay use the
replaysSessionSampleRate
orreplaysOnErrorSampleRate
options.import * as Sentry from '@sentry/react-native'; Sentry.init({ _experiments: { replaysSessionSampleRate: 1.0, replaysOnErrorSampleRate: 1.0, }, });
To add React Component Names use
annotateReactComponents
inmetro.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.