Skip to content

feat(android): update session replay masking precedence rules#518

Merged
beekld merged 5 commits intomainfrom
beeklimt/O11Y-1397
May 1, 2026
Merged

feat(android): update session replay masking precedence rules#518
beekld merged 5 commits intomainfrom
beeklimt/O11Y-1397

Conversation

@beekld
Copy link
Copy Markdown
Contributor

@beekld beekld commented May 1, 2026

Summary

Changes Android semantics to match iOS when applying session replay masking precedence rules.

This changes existing masking behavior, but should be clearer than the previous behavior. Please see the README changes for details.

How did you test this change?

Unit tests added.

Are there any deployment considerations?

N/A


Note

Medium Risk
Changes core session replay privacy behavior by introducing explicit mask/unmask precedence and propagation, which could affect what gets redacted in recordings. Risk is mitigated by added unit tests but still impacts sensitive-data handling paths.

Overview
Aligns Android session replay masking with a new explicit precedence model: explicit mask (including ldMask() and maskXMLViewIds) propagates to descendants and overrides everything, explicit unmask (ldUnmask()) propagates but cannot override an explicit mask, and global privacy rules (e.g. maskTextInputs, maskText, maskWebViews) only apply when no explicit signal exists.

Implements this by splitting PrivacyProfile matchers into explicitMaskMatchers vs globalMaskMatchers, extending MaskTarget with hasLDUnmask, updating MaskCollector traversal to carry inherited explicit state, and wiring ImageCaptureService to pass both matcher sets. Adds focused tests for the new precedence rules and updates docs/comments to match; the React Native adapter also switches Observability logging to LDObserveLogging.adapter().

Reviewed by Cursor Bugbot for commit d7e05f1. Bugbot is set up for automated code reviews on this repo. Configure here.

@beekld beekld requested a review from a team as a code owner May 1, 2026 00:53
@beekld beekld force-pushed the beeklimt/O11Y-1397 branch from 840995a to f2f5317 Compare May 1, 2026 17:15
@beekld beekld merged commit 4299d1e into main May 1, 2026
25 checks passed
@beekld beekld deleted the beeklimt/O11Y-1397 branch May 1, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants