-
-
Notifications
You must be signed in to change notification settings - Fork 465
feat(replay): Track custom masking usage via integration #5088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+122
−7
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove tracking from container class setters (RN sets them unconditionally) and add tracking when custom view tags or Compose privacy modifiers are encountered. Uses a volatile flag to avoid repeated integration additions per view. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…methods Replace direct addIntegrationToSdkVersion calls with trackCustomMaskingTag() in setMaskAllText, setMaskAllImages, addMaskViewClass, and addUnmaskViewClass so all entry points benefit from the volatile flag optimization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- customMaskingTagTracked -> customMaskingTracked - trackCustomMaskingTag() -> trackCustomMasking() - resetCustomMaskingTagTracked() -> resetCustomMaskingTracked() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
🤖 This preview updates automatically when you update the PR. |
Contributor
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| fcec2f2 | 314.96 ms | 373.66 ms | 58.70 ms |
| ee747ae | 554.98 ms | 611.50 ms | 56.52 ms |
| 27d7cf8 | 306.76 ms | 366.66 ms | 59.90 ms |
| fcec2f2 | 328.91 ms | 387.75 ms | 58.84 ms |
| 8687935 | 332.52 ms | 362.23 ms | 29.71 ms |
| b77456b | 393.26 ms | 441.10 ms | 47.84 ms |
| ee747ae | 400.46 ms | 423.61 ms | 23.15 ms |
| ee747ae | 374.71 ms | 455.18 ms | 80.47 ms |
| bbc35bb | 298.53 ms | 372.17 ms | 73.64 ms |
| 94bff8d | 313.23 ms | 352.77 ms | 39.54 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| fcec2f2 | 1.58 MiB | 2.12 MiB | 551.50 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| 27d7cf8 | 1.58 MiB | 2.12 MiB | 549.42 KiB |
| fcec2f2 | 1.58 MiB | 2.12 MiB | 551.50 KiB |
| 8687935 | 1.58 MiB | 2.19 MiB | 619.17 KiB |
| b77456b | 1.58 MiB | 2.12 MiB | 548.11 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| bbc35bb | 1.58 MiB | 2.12 MiB | 553.01 KiB |
| 94bff8d | 1.58 MiB | 2.20 MiB | 635.37 KiB |
markushi
added a commit
that referenced
this pull request
Feb 10, 2026
* feat(replay): Track custom masking usage via fake integration * chore(changelog): Add PR #5070 to changelog * fix(replay): Address PR feedback for custom masking tracking Remove tracking from container class setters (RN sets them unconditionally) and add tracking when custom view tags or Compose privacy modifiers are encountered. Uses a volatile flag to avoid repeated integration additions per view. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(replay): Use trackCustomMaskingTag() consistently in all masking methods Replace direct addIntegrationToSdkVersion calls with trackCustomMaskingTag() in setMaskAllText, setMaskAllImages, addMaskViewClass, and addUnmaskViewClass so all entry points benefit from the volatile flag optimization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(replay): Rename custom masking tracking methods - customMaskingTagTracked -> customMaskingTracked - trackCustomMaskingTag() -> trackCustomMasking() - resetCustomMaskingTagTracked() -> resetCustomMaskingTracked() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(changelog): Update PR reference to #5088 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Format code * Fix Changelog * fix slop * Address PR comments * Format code --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
Add a
ReplayCustomMaskingfake integration whenever users use any custom masking API. This tracks adoption of custom masking configurations to help measure usage before potentially switching to the canvas strategy.Tracking is triggered when any of these are used:
setMaskAllText()setMaskAllImages()addMaskViewClass()addUnmaskViewClass()sentry-mask/sentry-unmaskview tagssentryReplayMask()/sentryReplayUnmask()Compose modifiersContainer class setters (
setMaskViewContainerClass/setUnmaskViewContainerClass) are excluded since React Native sets them unconditionally.A
volatile booleanflag ensures the integration is only registered once, avoiding repeatedCopyOnWriteArraySetoperations during view hierarchy traversal.💡 Motivation and Context
We want to track how many users are using custom masking configurations before potentially switching to the canvas recording strategy. This fake integration will appear in the SDK integrations list and can be queried in Looker.
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Monitor adoption via Looker dashboards.