From c4f893a5c557918ab6abcce3cb3a43abec830114 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 21 Jul 2025 14:34:14 +0300 Subject: [PATCH 1/2] RN: Adds replaysSessionQuality option --- .../session-replay/performance-overhead.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/platforms/react-native/session-replay/performance-overhead.mdx b/docs/platforms/react-native/session-replay/performance-overhead.mdx index 7d9c1aa5b70c93..d421fd115502e8 100644 --- a/docs/platforms/react-native/session-replay/performance-overhead.mdx +++ b/docs/platforms/react-native/session-replay/performance-overhead.mdx @@ -44,3 +44,19 @@ The benchmarks were run on an iPhone 14 Pro and a Pixel 2XL. Note that active Se | App Startup Time (Cold) | 1533.35 ms | 1539.55 ms | | Main Thread Time | n/a | 20ms | | Network Bandwidth | n/a | 7 KB/s of recording | + +## Reducing Performance Overhead + +To minimize the performance impact of the Replay SDK, consider lowering the quality of captured screenshots and videos. Setting the `replaysSessionQuality` to `low` can significantly reduce CPU, memory, and network bandwidth usage. Here's how you can do it: + +```js {tabTitle: React Native} + import * as Sentry from '@sentry/react-native'; + + Sentry.init({ + replaysSessionSampleRate: 1.0, + replaysSessionQuality: 'low', + integrations: [Sentry.mobileReplayIntegration()], + }); +``` + +Note that the default value for `replaysSessionQuality` is `medium` and a `high` quality setting is also available. \ No newline at end of file From b47cb87d1473126429dae335dbe6d732a8053405 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 21 Jul 2025 16:27:51 +0300 Subject: [PATCH 2/2] Specifically mention mobile platforms --- .../react-native/session-replay/performance-overhead.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/react-native/session-replay/performance-overhead.mdx b/docs/platforms/react-native/session-replay/performance-overhead.mdx index d421fd115502e8..477ca0b51dd1a4 100644 --- a/docs/platforms/react-native/session-replay/performance-overhead.mdx +++ b/docs/platforms/react-native/session-replay/performance-overhead.mdx @@ -47,7 +47,7 @@ The benchmarks were run on an iPhone 14 Pro and a Pixel 2XL. Note that active Se ## Reducing Performance Overhead -To minimize the performance impact of the Replay SDK, consider lowering the quality of captured screenshots and videos. Setting the `replaysSessionQuality` to `low` can significantly reduce CPU, memory, and network bandwidth usage. Here's how you can do it: +To minimize the performance impact of the Replay SDK on iOS and Android, consider lowering the quality of captured screenshots and videos. Setting the `replaysSessionQuality` to `low` can significantly reduce CPU, memory, and network bandwidth usage on mobile devices. Here's how you can do it: ```js {tabTitle: React Native} import * as Sentry from '@sentry/react-native';