From c0164640ea76d768e6504eaad5838ced2cd3c16b Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Thu, 15 Jan 2026 16:49:17 +0100 Subject: [PATCH] React Native UI profiling docs --- .../react-native/profiling/index.mdx | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/platforms/react-native/profiling/index.mdx b/docs/platforms/react-native/profiling/index.mdx index 6c61a6e30370af..87cc193bf9605b 100644 --- a/docs/platforms/react-native/profiling/index.mdx +++ b/docs/platforms/react-native/profiling/index.mdx @@ -66,3 +66,30 @@ Sentry.init({ #### platformProfilers 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) + + + +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. + + + +```javascript +import * as Sentry from '@sentry/react-native'; + +Sentry.init({ + dsn: 'YOUR_DSN', + tracesSampleRate: 1.0, // Required for trace mode + + _experiments: { + androidProfilingOptions: { + profileSessionSampleRate: 1.0, + lifecycle: 'trace', + startOnAppStart: true, + }, + }, +}); +``` + +For more information, see [the Android SDK documentation](https://docs.sentry.io/platforms/android/profiling/#enabling-ui-profiling)