Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions docs/platforms/react-native/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,38 @@ Sentry.init({

Default value `true`, platform profilers are enabled. By default both React Native JS code executed in Hermes engine and platform specific code (Swift, Objective-C, Kotlin, Java) are profiled by their respective profilers. Setting `platformProfilers` to `false` will disable profiling of the platform specific code and only the JS code executed in Hermes will be profiled. This option is available since the SDK version [5.33.0](https://github.com/getsentry/sentry-react-native/releases/tag/5.33.0).

## Android UI Profiling (experimental)
## UI Profiling (experimental)

<Alert>

Profiling for React Native is available in SDK versions `7.9.0` and above. Android is currently the only supported platform, and support is still experimental.
UI Profiling for React Native is available in SDK versions `7.9.0` and above on Android. iOS support was added in `7.12.0`. This feature is still experimental.

</Alert>

```javascript
import * as Sentry from '@sentry/react-native';
import * as Sentry from "@sentry/react-native";

Sentry.init({
dsn: 'YOUR_DSN',
dsn: "YOUR_DSN",
tracesSampleRate: 1.0, // Required for trace mode

_experiments: {
androidProfilingOptions: {
profilingOptions: {
profileSessionSampleRate: 1.0,
lifecycle: 'trace',
lifecycle: "trace",
startOnAppStart: true,
},
},
});
```

For more information, see [the Android SDK documentation](https://docs.sentry.io/platforms/android/profiling/#enabling-ui-profiling)
<Alert>

The `androidProfilingOptions` key is now deprecated. Use `profilingOptions` instead.

</Alert>

For more information, see the platform-specific documentation:

- [Android SDK documentation](https://docs.sentry.io/platforms/android/profiling/#enabling-ui-profiling)
- [iOS SDK documentation](https://docs.sentry.io/platforms/apple/guides/ios/profiling/#enable-ui-profiling)