@sentry/react-native
Advanced tools
Changelog
6.7.0
[!WARNING] This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 6.4.0 if you use this feature on Android. See issue #4598 for more details.
Add ignoredComponents
option to annotateReactComponents
to exclude specific components from React component annotations (#4517)
// metro.config.js
// for React Native
const config = withSentryConfig(mergedConfig, {
annotateReactComponents: {
ignoredComponents: ['MyCustomComponent']
}
});
// for Expo
const config = getSentryExpoConfig(__dirname, {
annotateReactComponents: {
ignoredComponents: ['MyCustomComponent'],
},
});
Changelog
6.6.0
[!WARNING] This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 6.4.0 if you use this feature on Android. See issue #4598 for more details.
makeDsn
from core
to extract the URL from DSN avoiding unimplemented URL.protocol
errors (#4395)navigation.processing
span to more expressive Navigation dispatch to screen A mounted/navigation cancelled
(#4423)sdk.packages
for Cocoa (#4381)RNSentryTimeToDisplay
during native module init
on iOS (#4443)Changelog
6.5.0
[!WARNING] This release contains an issue where Cold starts can be incorrectly reported as Warm starts on Android. We recommend staying on version 6.4.0 if you use this feature on Android. See issue #4598 for more details.
Mobile Session Replay is now generally available and ready for production use (#4384)
To learn about privacy, custom masking or performance overhead visit the documentation.
import * as Sentry from '@sentry/react-native';
Sentry.init({
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
integrations: [
Sentry.mobileReplayIntegration({
maskAllImages: true,
maskAllVectors: true,
maskAllText: true,
}),
],
});
Adds new captureFeedback
and deprecates the captureUserFeedback
API (#4320)
import * as Sentry from "@sentry/react-native";
const eventId = Sentry.lastEventId();
Sentry.captureFeedback({
name: "John Doe",
email: "john@doe.com",
message: "Hello World!",
associatedEventId: eventId, // optional
});
To learn how to attach context data to the feedback visit the documentation.
Export Span
type from @sentry/types
(#4345)
Add RN SDK package to sdk.packages
on Android (#4380)
lastEventId
export from @sentry/core
(#4315)sentry-expo-upload-sourcemaps
(#4332)options.environment
(empty string, undefined...) default to production
_experiments.replaysSessionSampleRate
and _experiments.replaysOnErrorSampleRate
use replaysSessionSampleRate
and replaysOnErrorSampleRate
(#4384)Changelog
6.4.0
Add Replay Custom Masking for iOS, Android and Web (#4224, #4265, #4272, #4314)
import * as Sentry from '@sentry/react-native';
const Example = () => {
return (
<View>
<Sentry.Mask>
<Text>${"All children of Sentry.Mask will be masked."}</Text>
</Sentry.Mask>
<Sentry.Unmask>
<Text>${"Only direct children of Sentry.Unmask will be unmasked."}</Text>
</Sentry.Unmask>
</View>
);
};
Changelog
6.4.0-beta.1
Add Replay Custom Masking for iOS, Android and Web (#4224, #4265, #4272, #4314)
import * as Sentry from '@sentry/react-native';
const Example = () => {
return (
<View>
<Sentry.Mask>
<Text>${"All children of Sentry.Mask will be masked."}</Text>
</Sentry.Mask>
<Sentry.Unmask>
<Text>${"Only direct children of Sentry.Unmask will be unmasked."}</Text>
</Sentry.Unmask>
</View>
);
};
Changelog
6.3.0
Add support for .env.sentry-build-plugin
(#4281)
Don't commit the file to your repository. Use it to set your Sentry Auth Token.
SENTRY_AUTH_TOKEN=your_token_here
Add Sentry Metro Server Source Context middleware (#4287)
This enables the SDK to add source context to locally symbolicated events using the Metro Development Server.
The middleware can be disabled in metro.config.js
using the enableSourceContextInDevelopment
option.
// Expo
const { getSentryExpoConfig } = require('@sentry/react-native/metro');
const config = getSentryExpoConfig(__dirname, {
enableSourceContextInDevelopment: false,
});
// React Native
const { withSentryConfig } = require('@sentry/react-native/metro');
module.exports = withSentryConfig(config, {
enableSourceContextInDevelopment: false,
});
DebugSymbolicator
after RewriteFrames
to avoid overwrites by default (#4285)
RewriteFrames
is provided the order changesbrowserReplayIntegration
is no longer included by default on React Native Web (#4270).sentry
tmp directory and use environmental variables instead to save default Babel transformer path (#4298)