Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/platforms/react-native/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,31 @@ If you encounter any data not being redacted with the default settings, please l

</Alert>

### Screenshot Strategy (Android only)

The SDK offers two strategies for recording replays on Android: `PixelCopy` and `Canvas`.

`PixelCopy` uses Android's [PixelCopy](https://developer.android.com/reference/android/view/PixelCopy) API to capture screenshots of the current screen and takes a snapshot of the view hierarchy within the same frame. The view hierarchy is then used to find the position of controls such as text boxes, images, labels, and buttons and mask them with a block that's drawn over these controls. This strategy has slightly lower performance overhead but may result in masking misalignments due to the asynchronous nature of the PixelCopy API. We recommend using this strategy for apps that do not have strict PII requirements or do not require masking functionality.

`Canvas` uses Android's custom [Canvas](https://developer.android.com/reference/android/graphics/Canvas) API to redraw the screen contents onto a bitmap, masking all `drawText` and `drawBitmap` operations in the process to produce a masked screenshot. This strategy has a slightly higher performance overhead but provides more reliable masking. We recommend using this strategy for apps with strict PII requirements.

<Alert level="warning">

The `Canvas` screenshot strategy is currently experimental and does **not** support any masking options. When the screenshot strategy is set to `Canvas`, it will **always** mask all texts, input fields and images, disregarding any masking options set. If you need more flexibility with masking, switch back to `PixelCopy`.

</Alert>

You can change the strategy as follows:

```javascript {tabTitle:Mobile}
integrations: [
// You can pass options to the mobileReplayIntegration function during init:
Sentry.mobileReplayIntegration({
screenshotStrategy: 'canvas' // or 'pixelCopy' (default)
}),
]
```

## React Component Names

Sentry helps you capture your React components and unlock additional insights in your application. You can set it up to use React component names.
Expand Down
6 changes: 6 additions & 0 deletions docs/platforms/react-native/session-replay/privacy/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ description: "Learn how to mask sensitive data that may appear in your app in Se

<Alert level="warning">

The masking options below only apply when using the default `PixelCopy` strategy on Android. If you set the strategy to [Canvas](/platforms/react-native/session-replay/#screenshot-strategy-android-only), those options will be ignored and all sensitive content (texts, inputs, images) will be **always** masked.

</Alert>

<Alert level="warning">

Before enabling Session Replay in production, verify your masking configuration to ensure no sensitive data is captured. Our default settings aggressively mask potentially sensitive data, but if you modify these settings or update UI frameworks or system SDKs, you must thoroughly test your application. If you find any masking issues or sensitive data that should be masked but isn't, please [create a GitHub issue](https://github.com/getsentry/sentry-react-native/issues/new/choose) and avoid deploying to production with Session Replay enabled until the issue is resolved.

<strong>Potential masking issues introduced when using Apple's Liquid Glass rendering in iOS 26.0</strong>
Expand Down
Loading