Official Sentry SDK for React-Native
MIT License
Bot releases are visible (Hide)
Published by getsentry-bot 11 months ago
Add @sentry/react-native/expo
Expo config plugin (#3429)
This Release introduces the first alpha version of our new SDK for Expo.
At this time, the SDK is considered experimental and things might break and change in future versions.
The core of the SDK is Expo plugin which you can easily add to your App config:
const { withSentry } = require('@sentry/react-native/expo');
const config = {...};
module.exports = withSentry(config, {
url: 'https://www.sentry.io/',
authToken: 'example-token', // Or use SENTRY_AUTH_TOKEN env
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__',
});
Update sentry-xcode.sh
scripts with Node modules resolution (#3450)
Published by getsentry-bot 11 months ago
New simplified Sentry Metro Serializer export (#3450)
const { createSentryMetroSerializer } = require('@sentry/react-native/metro');
Published by getsentry-bot 11 months ago
Published by getsentry-bot 11 months ago
Published by getsentry-bot 11 months ago
Export New JS Performance API (#3371)
// Start a span that tracks the duration of expensiveFunction
const result = Sentry.startSpan({ name: 'important function' }, () => {
return expensiveFunction();
});
Read more at https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7690
Report current screen in contexts.app.view_names
(#3339)
platform: node
from Debug Builds Events (#3377)Published by getsentry-bot about 1 year ago
Add buildFeatures.buildConfig=true
to support AGP 8 (#3298)
Add Debug IDs support (#3164)
This is optional. Your current setup will keep working as is.
Add Sentry Metro Serializer to metro.config.js
to generate Debug ID for the application bundle and source map.
const {createSentryMetroSerializer} = require('@sentry/react-native/dist/js/tools/sentryMetroSerializer');
const config = {serializer: createSentryMetroSerializer()};
On iOS update Bundle React Native Code and Images
and Upload Debug Symbols to Sentry
build phases.
set -e
WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh"
/bin/sh -c "$WITH_ENVIRONMENT \"/bin/sh ../scripts/sentry-xcode.sh $REACT_NATIVE_XCODE\""
/bin/sh ../../scripts/sentry-xcode-debug-files.sh
More information about the new setup can be found here.
Add SENTRY_DISABLE_AUTO_UPLOAD
flag (#3323)
How to use in Android project? It works by default, just set export SENTRY_DISABLE_AUTO_UPLOAD=true
in your build environment. For Sentry Android Gradle Plugin add the following to your android/app/build.gradle
.
apply from: "../../../sentry.gradle"
sentry {
autoUploadProguardMapping = shouldSentryAutoUpload()
uploadNativeSymbols = shouldSentryAutoUpload()
}
How to use in Xcode? Make sure you are using scripts/sentry-xcode.sh
and scripts/sentry-xcode-debug-files.sh
in your
build phases. And add the following to your ios/.xcode.env.local
file.
export SENTRY_DISABLE_AUTO_UPLOAD=true
Sentry.wrap
doesn't enforce any keys on the wrapped component props (#3332)ReactNativeTracingOptions.tracingOrigins
if set in the options (#3331)Published by getsentry-bot about 1 year ago
Published by getsentry-bot about 1 year ago
Add support for React Native mixed stacktraces (#3201)
In the current react-native@nightly
(0.73.0-nightly-20230809-cb60e5c67
) JS errors from native modules can
contain native JVM or Objective-C exception stack trace. Both JS and native stack trace
are processed by default no configuration needed.
Add tracePropagationTargets
option (#3230)
This release adds support for distributed tracing
without requiring performance monitoring to be active on the React Native SDK.
This means even if there is no sampled transaction/span, the SDK will still propagate traces to downstream services.
Distributed Tracing can be configured with the tracePropagationTargets
option,
which controls what requests to attach the sentry-trace
and baggage
HTTP headers to (which is what propagates tracing information).
Sentry.init({
tracePropagationTargets: ["third-party-site.com", /^https:\/\/yourserver\.io\/api/],
});
Sentry.init
must be called before Sentry.wrap
(#3227)
isNativeAvailable
after SDK reinitialization (#3200)Published by getsentry-bot about 1 year ago
Alpha support for Hermes JavaScript Profiling (#3057)
Profiling is disabled by default. To enable it, configure both
tracesSampleRate
and profilesSampleRate
when initializing the SDK:
Sentry.init({
dsn: '__DSN__',
tracesSampleRate: 1.0,
_experiments: {
// The sampling rate for profiling is relative to TracesSampleRate.
// In this case, we'll capture profiles for 100% of transactions.
profilesSampleRate: 1.0,
},
});
More documentation on profiling and current limitations can be found here.
promise
package which can cause unexpected behavior like undefined Promise.allSettled
(#3162)beforeSend
callback similarly to iOS. (#3170)Published by getsentry-bot over 1 year ago
sentry-expo
packageenableNative
if Native SDK is not available (#3099)collectModulesScript
path to support monorepos (#3092)Published by getsentry-bot over 1 year ago
Published by getsentry-bot over 1 year ago