Skip to content

Commit 887136a

Browse files
committed
Fix and add masking behavior section
1 parent 80788c4 commit 887136a

File tree

1 file changed

+22
-3
lines changed
  • docs/platforms/android/session-replay/privacy

1 file changed

+22
-3
lines changed

docs/platforms/android/session-replay/privacy/index.mdx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ options.experimental.sessionReplay.maskAllText = false
2222
options.experimental.sessionReplay.maskAllImages = false
2323
```
2424

25-
Session Replay Unmasked | Session Replay Masked
26-
:-----------------------------:|:-----------------------------:
27-
![](./img/session-replay.jpg) | ![](./img/session-replay-redacted.jpg)
25+
|Session Replay Unmasked | Session Replay Masked |
26+
|:-----------------------------:|:---------------------------------------: |
27+
|![session replay unmasked](./img/session-replay.jpg) |![session replay masked](./img/session-replay-redacted.jpg) |
2828

2929

3030
_Make sure your Sentry Android SDK version is at least 7.15.0._
@@ -133,3 +133,22 @@ AndroidView(
133133
factory = { context -> ... }
134134
)
135135
```
136+
137+
## Masking Behavior
138+
139+
Here are some general rules we follow when applying masking rules:
140+
141+
### View Groups
142+
143+
- When a `ViewGroup` is marked as masked, **all its child views inherit this behavior and will be masked too**, even if some of those child views would typically be ignored. This approach prioritizes safety and ensures no sensitive information is exposed unintentionally.
144+
145+
- When a `ViewGroup` is marked as unmasked, **its child views do not automatically inherit its behavior**. Each child view must be explicitly marked as unmasked if you want to capture them in the replay.
146+
147+
### Masking prioritization
148+
149+
The following order determines how masking/unmasking rules are applied:
150+
151+
1. Check if a view is marked as `unmasked` via a tag/extension function/modifier
152+
2. Check if a view is marked as `masked` via a tag/extension function/modifier
153+
3. Check if a view's class is marked as unmasked via `addUnmaskViewClass`
154+
4. Check if a view's class is marked as masked via `addMaskViewClass`

0 commit comments

Comments
 (0)