Skip to content

feat(android): add features needed for react native android session replay masking#527

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

feat(android): add features needed for react native android session replay masking#527
beekld merged 2 commits intomainfrom
beeklimt/O11Y-1398-1

Conversation

@beekld
Copy link
Copy Markdown
Contributor

@beekld beekld commented May 5, 2026

Summary

Two related fixes to the Android session replay SDK to make masking work correctly with React Native views:

  1. maskXMLViewIds and unmaskXMLViewIds now also match the value of the react_test_id tag (RN's testID prop) when the React Native library is on the runtime classpath. Resolved reflectively so the SDK has no compile-time RN dependency.
  2. maskImageViews now catches ImageView subclasses (notably RN's ReactImageView) instead of only the exact android.widget.ImageView class.

How did you test this change?

Tested with PR #528 using the example app and capturing a session replay.

Are there any deployment considerations?

N/A


Note

Medium Risk
Updates session replay masking matchers, which can change what UI is captured vs masked (privacy-sensitive) and could cause over/under-masking in apps, especially with mixed native/RN view hierarchies.

Overview
Improves PrivacyProfile masking to work with React Native-rendered views by having maskXMLViewIds/unmaskXMLViewIds also match RN’s testID via the react_test_id view tag (resolved reflectively to avoid an RN dependency).

Updates maskImageViews to mask all ImageView instances (including subclasses) by introducing an imageViewMatcher instead of relying on exact-class matching, and refreshes docs/tests to reflect the new behavior.

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

@beekld beekld force-pushed the beeklimt/O11Y-1398-1 branch from 3a3bfb7 to 65f2af5 Compare May 5, 2026 22:36
@beekld beekld marked this pull request as ready for review May 5, 2026 22:40
@beekld beekld requested a review from a team as a code owner May 5, 2026 22:40
Copy link
Copy Markdown
Contributor

@abelonogov-ld abelonogov-ld left a comment

Choose a reason for hiding this comment

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

Good!, Thanks for checking that react exists

@beekld beekld merged commit 9431a00 into main May 5, 2026
25 checks passed
@beekld beekld deleted the beeklimt/O11Y-1398-1 branch May 5, 2026 23:45
abelonogov-ld pushed a commit that referenced this pull request May 6, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>launchdarkly-observability-android: 0.45.0</summary>

##
[0.45.0](launchdarkly-observability-android-0.44.0...launchdarkly-observability-android-0.45.0)
(2026-05-05)


### Features

* **android:** add features needed for react native android session
replay masking
([#527](#527))
([9431a00](9431a00))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk release metadata update that only bumps the
`observability-android` package version and changelog/Gradle version,
with no code changes in this PR.
> 
> **Overview**
> Updates the `sdk/@launchdarkly/observability-android` release from
`0.44.0` to `0.45.0` by bumping the version in
`.release-please-manifest.json` and `gradle.properties` and adding the
corresponding `CHANGELOG.md` entry (React Native Android session replay
masking support).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
2054ba6. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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