@sentry/react-native
Advanced tools
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)Changelog
5.16.0
This release ships with a beta version of our new built-in Expo SDK 50 support,
which replaces the deprecated sentry-expo
package. To learn more,
see the Expo guide.
New @sentry/react-native/expo
Expo config plugin (#3429)
const { withSentry } = require('@sentry/react-native/expo');
const config = {...};
module.exports = withSentry(config, {
url: 'https://www.sentry.io/',
project: 'project-slug', // Or use SENTRY_PROJECT env
organization: 'org-slug', // Or use SENTRY_ORG env
});
Sentry.init
in App.js
import * as Sentry from '@sentry/react-native';
Sentry.init({
dsn: '__DSN__',
});
New getSentryExpoConfig
for simple Metro configuration (#3454, #3501, #3514)
getDefaultConfig
from expo/metro-config
// const { getDefaultConfig } = require("expo/metro-config");
const { getSentryExpoConfig } = require("@sentry/react-native/metro");
// const config = getDefaultConfig(__dirname);
const config = getSentryExpoConfig(__dirname);
New npx sentry-expo-upload-sourcemaps
for simple EAS Update (npx expo export
) source maps upload (#3491, #3510, #3515, #3507)
SENTRY_PROJECT=project-slug \
SENTRY_ORG=org-slug \
SENTRY_AUTH_TOKEN=super-secret-token \
npx sentry-expo-upload-sourcemaps dist
sentry-xcode.sh
scripts with Node modules resolution (#3450)
sentry-xcode-debug-files.sh
(#3523)Changelog
5.16.0-alpha.3
This release is compatible with expo@50.0.0-preview.6
and newer.
withSentryExpoSerializers
changes to getSentryExpoConfig
(#3501)
getSentryExpoConfig
accepts the same parameters as getDefaultConfig
from expo/metro-config
and returns Metro configurationexpo/metro-config
and used by Sentry.const { getSentryExpoConfig } = require("@sentry/react-native/metro");
const config = getSentryExpoConfig(config, {});
Add npx sentry-expo-upload-sourcemaps
for simple EAS Update (expo export) source maps upload to Sentry (#3491, #3510)
SENTRY_PROJECT=project-slug \
SENTRY_ORG=org-slug \
SENTRY_AUTH_TOKEN=super-secret-token \
npx sentry-expo-upload-sourcemaps dist
Sentry CLI binary path in scripts/expo-upload-sourcemaps.js
is resolved dynamically (#3507)
SENTRY_CLI_EXECUTABLE
envResolve Default Integrations based on current platform (#3465)
Remove Native Modules warning from platform where the absence is expected (#3466)
Add Expo Context information using Expo Native Modules (#3466)