Skip to content

Commit db8ba38

Browse files
antonisclaude
andcommitted
docs(react-native): Document screenshot masking options for Android
Document the new `screenshot.maskAllText` and `screenshot.maskAllImages` options for error screenshot masking on Android. Companion SDK PR: getsentry/sentry-react-native#6007 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 39c95fc commit db8ba38

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

docs/platforms/react-native/configuration/options.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,23 @@ _(New in version 4.11.0)_
153153

154154
</SdkOption>
155155

156+
<SdkOption name="screenshot" type="object">
157+
158+
Configures masking for error screenshots on Android. When `attachScreenshot` is enabled, these options control what gets masked in the captured screenshot. Both `maskAllText` and `maskAllImages` default to `true`.
159+
160+
```javascript
161+
screenshot: {
162+
maskAllText: true,
163+
maskAllImages: true,
164+
}
165+
```
166+
167+
Learn more in our <PlatformLink to="/enriching-events/screenshots/">Screenshots documentation</PlatformLink>.
168+
169+
<Note>Currently only supported on Android.</Note>
170+
171+
</SdkOption>
172+
156173
<SdkOption name="attachViewHierarchy" type="boolean" defaultValue="false">
157174

158175
Renders a JSON representation of the entire view hierarchy of the application when an error happens and includes it as an attachment.

platform-includes/enriching-events/attach-screenshots/react-native.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,22 @@ Sentry.init({
66
attachScreenshot: true,
77
});
88
```
9+
10+
### Screenshot Masking (Android)
11+
12+
On Android, you can configure masking to automatically redact sensitive content like text and images from error screenshots. Masking is enabled by default.
13+
14+
```javascript
15+
Sentry.init({
16+
dsn: "___PUBLIC_DSN___",
17+
attachScreenshot: true,
18+
screenshot: {
19+
maskAllText: true, // default: true
20+
maskAllImages: true, // default: true
21+
},
22+
});
23+
```
24+
25+
<Note>
26+
Screenshot masking on Android requires the `sentry-android-replay` module at runtime. This is included automatically when using the Sentry React Native SDK.
27+
</Note>

0 commit comments

Comments
 (0)