Skip to content

docs(session-replay): State that mobile masking is best effort - #20958

Draft
sentry-junior[bot] wants to merge 14 commits into
masterfrom
docs/mobile-replay-masking-best-effort
Draft

sentry-junior[bot] wants to merge 14 commits into
masterfrom
docs/mobile-replay-masking-best-effort

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • New shared include, 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.
  • Each page keeps its SDK-specific details next to the include: where to report masking issues and, on Android and React Native, the Canvas strategy for apps with sensitive data.
  • New Supported Components section on every page, all using the same #supported-components anchor. 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 in UIImageView, 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.
  • The Android Compose painter row names Coil's AsyncImage and notes that Coil 3.1+ AsyncImage is masked from SDK version 8.66.0 (fix(replay): Mask Coil 3.1+ AsyncImage in Compose sentry-java#6759). The Android Compose section still recommends Modifier.sentryReplayMask() for images from image loading libraries, because their internals change between versions. The Android page notes that content inside AndroidView or a WebView isn't masked.
  • The iOS, Android, and React Native setup pages no longer say the SDK is "aggressively masking all" content or that no sensitive data will leave the device. The iOS setup page's production warning uses the same best-effort wording.
  • Every mobile page that summarized the default masking now links to Supported Components instead of listing example components or promising complete masking. That covers the setup and masking pages for iOS, Android, React Native, and Flutter, the Data Collected pages for all four, and the "How do you protect user data?" answer in the mobile Session Replay FAQ.
  • KMP gets the shared warning and a Supported Components section that links to the Android and iOS lists. The KMP SDK has no masking logic of its own: it passes maskAllText and maskAllImages to 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.
  • The masking FAQs on the Android and iOS troubleshooting pages now link to Supported Components instead of repeating the component lists.

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?

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • 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

via Chris Aigner, @christophaigner.

--

View Session [Sentry]

@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Dec 1, 2026 9:20am UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Dec 1, 2026 9:20am UTC

Request Review

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Nov 24, 2026
@codeowner-assignment
codeowner-assignment Bot requested review from a team, 0xadam-brown, alwx, antonis, itaybre, philprime and romtsn and removed request for a team November 24, 2026 09:27
@antonis

antonis commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@sentry-junior can you add screenshots on this pr similar to what you did here #20032

@sentry-junior

sentry-junior Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Screenshots

These were rendered from a local dev server on this branch (docs/mobile-replay-masking-best-effort). The "before" shot is the same page on docs.sentry.io, built from master.

Before: Android privacy page, old production warning (iOS, React Native, and Flutter had the same text)
Before: Android warning

After: Android privacy page, shared best-effort warning and Android-specific guidance
After: Android warning

After: Android Supported Components
After: Android Supported Components

After: iOS Supported Components
After: iOS Supported Components

After: React Native Supported Components
After: React Native Supported Components

After: Flutter Supported Components
After: Flutter Supported Components

After: KMP shared warning and Supported Components
After: KMP

@codeowner-assignment
codeowner-assignment Bot requested review from a team November 24, 2026 15:50
@codeowner-assignment
codeowner-assignment Bot requested a review from a team November 24, 2026 15:51

@sentry-junior sentry-junior Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source links for the default-masking lists, so reviewers can check each Supported Components table against the SDK code. All links are permalinks to the commits the lists were checked against.


_Make sure your Sentry Android SDK version is at least 7.20.0._

## Supported Components

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sources: getsentry/sentry-java@7d8bd73

</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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ignored UISlider/UISwitch
  • UIImageView exemptions: images 10pt or smaller in width or height, SF Symbols, and bundled assets


</Alert>

## Supported Components

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sources: getsentry/sentry-react-native@c82b1bd

  • Default options: maskAllText, maskAllImages, and maskAllVectors default to true
  • iOS classes: RNSVGSvgView, RCTImageView, RCTImageComponentView, RCTTextView, RCTParagraphComponentView
  • Android classes: PreparedLayoutTextView and com.horcrux.svg.SvgView. Other text and images are covered by the native TextView/ImageView defaults.
  • 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sources: getsentry/sentry-dart@7a71584

  • Image rules: all Image widgets, or all except asset images when maskAssetImages is false
  • Text and SensitiveContent rules: Text, EditableText, and RichText behind maskAllText. The SensitiveContent rule is added regardless of the flags.

@sentry-junior sentry-junior Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source links for the KMP Supported Components section.


To change recording quality, import `io.sentry.kotlin.multiplatform.SentryReplayOptions` and set `options.sessionReplay.quality` inside your initializer.

### Supported Components

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: maskAllText and maskAllImages, both true by default
  • Android: copies them onto SentryAndroidOptions.sessionReplay, so sentry-java's defaults apply (see the Android table)
  • iOS: builds a Cocoa SentryReplayOptions and sets it with setSessionReplay, so sentry-cocoa's defaults apply (see the iOS table)

Nothing else under sentry-kotlin-multiplatform/src (tests excluded) references replay masking or redaction.

@codeowner-assignment
codeowner-assignment Bot requested review from a team and markushi and removed request for a team November 30, 2026 16:16
@codeowner-assignment
codeowner-assignment Bot requested a review from a team November 30, 2026 16:17
@codeowner-assignment
codeowner-assignment Bot requested a review from a team December 1, 2026 09:04
@romtsn

romtsn commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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.

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — c59138c2 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants