Repository navigation
docs(session-replay): State that mobile masking is best effort - #20958
sentry-junior[bot] wants to merge 14 commits into
Conversation
Co-Authored-By: Chris Aigner <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
@sentry-junior can you add screenshots on this pr similar to what you did here #20032 |
…KMP page Co-Authored-By: Chris Aigner <[email protected]>
…st SDK source Co-Authored-By: Chris Aigner <[email protected]>
…setup pages Co-Authored-By: Chris Aigner <[email protected]>
Co-Authored-By: Chris Aigner <[email protected]>
|
|
||
| _Make sure your Sentry Android SDK version is at least 7.20.0._ | ||
|
|
||
| ## Supported Components |
There was a problem hiding this comment.
Sources: getsentry/sentry-java@7d8bd73
- View classes masked by default, with the class names
- Drawables that are skipped: inset, color, vector, and gradient drawables, and bitmaps 10px or smaller in width or height
- Compose text and text fields
- Compose painters: any painter except vector, color, and brush painters is masked
| </Alert> | ||
| By default, our Session Replay SDK masks text content, images, and user input. You can also manually choose which parts of your app's data you want to mask by using the different options listed below. | ||
|
|
||
| ## Supported Components |
There was a problem hiding this comment.
Sources: getsentry/sentry-cocoa@9d4bf21
- Masked and ignored classes: text, SwiftUI text and images,
UIImageView, and, inside#if os(iOS) || os(visionOS), web, PDF, Safari, and video views plus the ignoredUISlider/UISwitch UIImageViewexemptions: images 10pt or smaller in width or height, SF Symbols, and bundled assets
|
|
||
| </Alert> | ||
|
|
||
| ## Supported Components |
There was a problem hiding this comment.
Sources: getsentry/sentry-react-native@c82b1bd
- Default options:
maskAllText,maskAllImages, andmaskAllVectorsdefault totrue - iOS classes:
RNSVGSvgView,RCTImageView,RCTImageComponentView,RCTTextView,RCTParagraphComponentView - Android classes:
PreparedLayoutTextViewandcom.horcrux.svg.SvgView. Other text and images are covered by the nativeTextView/ImageViewdefaults. - Web views and video players come from the native SDK defaults linked on the Android and iOS tables.
|
|
||
| These rules apply to both screenshots and Session Replay. Custom rules and `SentryUnmask` take precedence over the default rules, so verify your configuration if you override masking. | ||
|
|
||
| ## Supported Components |
There was a problem hiding this comment.
Sources: getsentry/sentry-dart@7a71584
- Image rules: all
Imagewidgets, or all except asset images whenmaskAssetImagesisfalse - Text and
SensitiveContentrules:Text,EditableText, andRichTextbehindmaskAllText. TheSensitiveContentrule is added regardless of the flags.
…faults Co-Authored-By: Chris Aigner <[email protected]>
|
|
||
| To change recording quality, import `io.sentry.kotlin.multiplatform.SentryReplayOptions` and set `options.sessionReplay.quality` inside your initializer. | ||
|
|
||
| ### Supported Components |
There was a problem hiding this comment.
Sources: getsentry/sentry-kotlin-multiplatform@ebbb469
The KMP SDK has no masking logic of its own. It only passes the shared options to the native SDKs, which do the masking:
- Shared replay options:
maskAllTextandmaskAllImages, bothtrueby default - Android: copies them onto
SentryAndroidOptions.sessionReplay, so sentry-java's defaults apply (see the Android table) - iOS: builds a Cocoa
SentryReplayOptionsand sets it withsetSessionReplay, so sentry-cocoa's defaults apply (see the iOS table)
Nothing else under sentry-kotlin-multiplatform/src (tests excluded) references replay masking or redaction.
…versions are fixed best effort
…yond supported children Co-Authored-By: Chris Aigner <[email protected]>
|
Remove the remaining promises of complete masking. The Android, Apple, and React Native Data Collected pages still say all text, images, webviews, and input are masked. The mobile product FAQ goes further and says no sensitive user information is collected. Link to the platform tables instead, as the PR already does for Flutter. |
…ages and the mobile FAQ Co-Authored-By: Chris Aigner <[email protected]>







DESCRIBE YOUR PR
The mobile Session Replay docs say masking is aggressive by default, but only the iOS SwiftUI section says it's best effort, and no page says which components the SDK actually masks. This PR makes both explicit for iOS, Android, React Native, Flutter, and Kotlin Multiplatform.
includes/session-replay-mobile-masking-warning.mdx. It replaces the copied "Before enabling Session Replay in production" warning on each page. It says masking is best effort, that only the components in Supported Components are masked automatically, and that apps must test the libraries and versions they ship.#supported-componentsanchor. Each list was checked against the SDK's default branch: getsentry/sentry-java@7d8bd73, getsentry/sentry-cocoa@9d4bf21, getsentry/sentry-react-native@c82b1bd, and getsentry/sentry-dart@7a71584. The lists include exemptions (small images, SF Symbols inUIImageView, vector drawables and painters), platform limits (iOS web views and video players are masked on iOS and visionOS only), and version requirements where they matter.AsyncImageand notes that Coil 3.1+AsyncImageis masked from SDK version 8.66.0 (fix(replay): Mask Coil 3.1+ AsyncImage in Compose sentry-java#6759). The Android Compose section still recommendsModifier.sentryReplayMask()for images from image loading libraries, because their internals change between versions. The Android page notes that content insideAndroidViewor aWebViewisn't masked.maskAllTextandmaskAllImagesto the native SDKs, which do the masking (getsentry/sentry-kotlin-multiplatform@ebbb469). Its existing note that Session Replay doesn't support Compose Multiplatform UI stays as is.Each Supported Components heading, including KMP's, has a review comment with permalinks to the SDK code that defines the defaults, so reviewers can check every row against the source.
Open decision: the SDK teams should confirm their lists before this is marked ready.
IS YOUR CHANGE URGENT?
PRE-MERGE CHECKLIST
via Chris Aigner, @christophaigner.
--
View Session [Sentry]