feat(sentry): enable on-error mobile session replay#7499
Open
hawkrives wants to merge 1 commit into
Open
Conversation
Adds `mobileReplayIntegration` so when an error is reported, Sentry also uploads a short replay of the frames leading up to it. Useful for reproducing UI-state-dependent bugs. Privacy posture: - `replaysSessionSampleRate: 0` — no blanket session recording. - `replaysOnErrorSampleRate: 0.1` — 10% of error-containing sessions are recorded. Tune up once we have a feel for volume / signal. - All masking options (`maskAllText`, `maskAllImages`, `maskAllVectors`) are passed explicitly as `true`, matching the defaults. They're spelled out so the privacy choice is visible at the call site. Still worth eyeballing a test recording in TestFlight before rolling to production — if any text or avatars slip through masking we'll either need to tighten per-view masks (`<Mask>`) or disable for the offending screens.
drewvolz
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #7464. Enables Sentry's mobile session replay on errors only, with aggressive masking.
What
Adds
mobileReplayIntegration. When an error is captured, Sentry uploads a short video of the frames leading up to it — useful for reproducing UI-state-dependent bugs that don't surface from the stack trace alone.Privacy / bandwidth posture
This is the reason this PR is separated out from #7497 and #7498.
replaysSessionSampleRate: 0— no blanket session recording. A replay is only produced if an error happens.replaysOnErrorSampleRate: 0.1— 10% of error-containing sessions are recorded. Easy to tune up once we have a feel for volume and signal.maskAllText: true,maskAllImages: true,maskAllVectors: true— every text node, image, and SVG is blurred in the recording. These match the library defaults but are spelled out so the privacy choice is visible at the call site.Verification before merging
Because replay ships screen recordings of real users, please don't merge without a manual pass on TestFlight:
If anything leaks, we have two escape hatches:
<Sentry.Mask>.excludedViewClasseson iOS.Why stacked on the v8 branch
mobileReplayIntegrationonly exists in@sentry/react-nativev8+, so this PR targetsrenovate/sentry-react-native-8.x. Will auto-retarget master once #7464 merges.Test plan
mise run tscpassesmise run lintpassesmise run pretty:checkpassesmise run testpasses (36 suites, 197 passing)