Skip to content

Commit c0f928f

Browse files
authored
RN: Adds replaysSessionQuality option (#14412)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR *Tell us what you're changing and why. If your PR **resolves an issue**, please link it so it closes automatically.* Adds `replaysSessionQuality` option in React Native session replay options ## 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+ ⚠️ Please merge after getsentry/sentry-react-native#5001 is released ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 3c5c7af commit c0f928f

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 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:
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)