@sentry/react-native
Advanced tools
Changelog
Changelog
5.26.0
Session Replay Public Beta (#3830)
To enable Replay use the replaysSessionSampleRate
or replaysOnErrorSampleRate
options.
import * as Sentry from '@sentry/react-native';
Sentry.init({
_experiments: {
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
},
});
To add React Component Names use annotateReactComponents
in metro.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.
Changelog
5.25.0
currentScreen
on native scope (#3927)error.cause
chain is locally symbolicated in development builds (#3920)sentry-expo-upload-sourcemaps
no longer requires Sentry url when uploading sourcemaps to sentry.io
(#3915)SENTRY_AUTH_TOKEN
env as fallback when token not found in sentry-flavor-type.properties
. (#3917)mechanism.handled:false
should crash current session (#3900)Changelog
5.25.0-alpha.2
@sentry/babel-plugin-component-annotate
(#3899)sentry-expo-upload-sourcemaps
no longer requires Sentry url when uploading sourcemaps to sentry.io
(#3915)Access to Mobile Replay is limited to early access orgs on Sentry. If you're interested, sign up for the waitlist
Changelog
5.24.0
client.init()
(#3882)sentry-cli
doesn't trigger Xcode error:
prefix (#3887)
--allow-failure
failing Xcode buildsChangelog
5.23.1
startTimeToInitialDisplaySpan
optional (#3867)Changelog
5.23.0
This release does not build on iOS. Please use 5.23.1
or newer.
Functional integrations (#3814)
Instead of installing @sentry/integrations
and creating integrations using the new
keyword, you can use direct imports of the functional integrations.
// Before
import * as Sentry from '@sentry/react-native';
import { HttpClient } from '@sentry/integrations';
Sentry.init({
integrations: [
new Sentry.BrowserIntegrations.Dedupe(),
new Sentry.Integration.Screenshot(),
new HttpClient(),
],
});
// After
import * as Sentry from '@sentry/react-native';
Sentry.init({
integrations: [
Sentry.dedupeIntegration(),
Sentry.screenshotIntegration(),
Sentry.httpClientIntegration(),
],
});
Note that the Sentry.BrowserIntegrations
, Sentry.Integration
and the Class style integrations will be removed in the next major version of the SDK.
rnpm
config (#3811)