Skip to content

Commit 4921004

Browse files
authored
React Native UI profiling docs (#16033)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR This PR is to support changes in UI profiling for React Native done here: getsentry/sentry-react-native#5518 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+
1 parent 86450f9 commit 4921004

File tree

1 file changed

+27
-0
lines changed
  • docs/platforms/react-native/profiling

1 file changed

+27
-0
lines changed

docs/platforms/react-native/profiling/index.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,30 @@ Sentry.init({
6666
#### platformProfilers
6767

6868
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).
69+
70+
## Android UI Profiling (experimental)
71+
72+
<Alert>
73+
74+
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.
75+
76+
</Alert>
77+
78+
```javascript
79+
import * as Sentry from '@sentry/react-native';
80+
81+
Sentry.init({
82+
dsn: 'YOUR_DSN',
83+
tracesSampleRate: 1.0, // Required for trace mode
84+
85+
_experiments: {
86+
androidProfilingOptions: {
87+
profileSessionSampleRate: 1.0,
88+
lifecycle: 'trace',
89+
startOnAppStart: true,
90+
},
91+
},
92+
});
93+
```
94+
95+
For more information, see [the Android SDK documentation](https://docs.sentry.io/platforms/android/profiling/#enabling-ui-profiling)

0 commit comments

Comments
 (0)