Set Up Profiling
React Native Profiling is currently in beta. Beta features are still in progress and may have bugs. We recognize the irony.
With profiling, Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments.
Enable Performance Monitoring
Profiling depends on Sentry’s performance monitoring product being enabled beforehand. To enable performance monitoring in the SDK:
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
tracesSampleRate: 1.0,
});
Check out the performance setup documentation for more detailed information on how to configure sampling. Setting the sample rate to 1.0 means all transactions will be captured.
Enable Profiling
Profiling for React Native is available in beta in SDK versions 5.8.0
and above. Currently, it supports profiling the JavaScript layer. Combined profiling with native Android/iOS layers isn't supported at this time.
To enable profiling, set the profilesSampleRate
:
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
tracesSampleRate: 1.0,
_experiments: {
// profilesSampleRate is relative to tracesSampleRate.
// Here, we'll capture profiles for 100% of transactions.
profilesSampleRate: 1.0,
},
});
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").
- Package:
- npm:@sentry/react-native
- Version:
- 5.10.0
- Repository:
- https://github.com/getsentry/sentry-react-native