Skip to content

Commit c4f893a

Browse files
committed
RN: Adds replaysSessionQuality option
1 parent 535bcb2 commit c4f893a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/platforms/react-native/session-replay/performance-overhead.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,19 @@ The benchmarks were run on an iPhone 14 Pro and a Pixel 2XL. Note that active Se
4444
| App Startup Time (Cold) | 1533.35 ms | 1539.55 ms |
4545
| Main Thread Time | n/a | 20ms |
4646
| Network Bandwidth | n/a | 7 KB/s of recording |
47+
48+
## Reducing Performance Overhead
49+
50+
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:
51+
52+
```js {tabTitle: React Native}
53+
import * as Sentry from '@sentry/react-native';
54+
55+
Sentry.init({
56+
replaysSessionSampleRate: 1.0,
57+
replaysSessionQuality: 'low',
58+
integrations: [Sentry.mobileReplayIntegration()],
59+
});
60+
```
61+
62+
Note that the default value for `replaysSessionQuality` is `medium` and a `high` quality setting is also available.

0 commit comments

Comments
 (0)