fix(session-replay): Update rendering method for fast view rendering#6360
Merged
fix(session-replay): Update rendering method for fast view rendering#6360
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6360 +/- ##
=============================================
+ Coverage 86.818% 87.301% +0.482%
=============================================
Files 438 438
Lines 37311 37311
Branches 17428 17434 +6
=============================================
+ Hits 32393 32573 +180
+ Misses 4874 4693 -181
- Partials 44 45 +1
... and 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2ec2700 | 1238.28 ms | 1258.82 ms | 20.53 ms |
| d0f70ce | 1226.54 ms | 1247.04 ms | 20.50 ms |
| 5bf2b17 | 1213.53 ms | 1238.54 ms | 25.01 ms |
| efab7d3 | 1219.98 ms | 1252.12 ms | 32.14 ms |
| e3ebff3 | 1223.47 ms | 1249.27 ms | 25.80 ms |
| 7b3399c | 1193.35 ms | 1227.38 ms | 34.03 ms |
| 3133d0e | 1237.86 ms | 1262.87 ms | 25.01 ms |
| 22b6996 | 1234.00 ms | 1263.24 ms | 29.24 ms |
| 43597ba | 1214.88 ms | 1243.52 ms | 28.65 ms |
| fc6557e | 1226.40 ms | 1249.88 ms | 23.48 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2ec2700 | 23.75 KiB | 980.80 KiB | 957.05 KiB |
| d0f70ce | 23.75 KiB | 913.09 KiB | 889.34 KiB |
| 5bf2b17 | 23.75 KiB | 913.27 KiB | 889.52 KiB |
| efab7d3 | 23.75 KiB | 912.78 KiB | 889.03 KiB |
| e3ebff3 | 23.75 KiB | 878.48 KiB | 854.73 KiB |
| 7b3399c | 23.75 KiB | 946.68 KiB | 922.94 KiB |
| 3133d0e | 23.74 KiB | 976.79 KiB | 953.04 KiB |
| 22b6996 | 23.75 KiB | 908.02 KiB | 884.27 KiB |
| 43597ba | 23.75 KiB | 880.32 KiB | 856.58 KiB |
| fc6557e | 23.75 KiB | 866.68 KiB | 842.93 KiB |
philipphofmann
pushed a commit
that referenced
this pull request
Oct 8, 2025
philprime
added a commit
that referenced
this pull request
Nov 5, 2025
philprime
added a commit
that referenced
this pull request
Nov 6, 2025
…in (#6678) * fix(session-replay): Update rendering method for fast view rendering (#6360) * fix(session-replay): Extend masking and focus masking on sensitive information (#6292) * test(session-replay): Add masking tests for common cases (#6567) * test(session-replay): Add masking tests for React Native views (#6568) * fix(session-replay): Fix conversion of frame rate to time interval (#6623) * test(session-replay): Add masking tests for edge cases (#6569) * test(session-replay): Add masking tests for UIKit views (#6570) * test(session-replay): Add masking tests for special views (#6571) * fix(session-replay): Include layer background color when checking if a view is opaque (#6629) * chore(tests): Remove snapshot testing to reduce repository size (#6631) * chore: Remove unwanted CHANGELOG entries from cherry-pick - Remove #5591 (minimum OS version warnings) - not related to session replay - Remove #6019 (SCNetworkReachability) - not related to session replay - Remove #6377 (thread event issue) - not related to session replay - Remove #6381 (frame delay) - duplicate/not related to session replay - Keep only session replay masking related changes * docs: Move changelog changes from v8.57.1 to unreleased * test: Resolve wrong assertions involed due to merge-conflict * chore: Update sdk_api_V9.json
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
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
Fix incorrect implementation of fast view rendering in
SentryViewRendererV2by switching fromCALayer.draw(in:)toCALayer.render(in:).Why this matters:
CALayer.draw(in:)only draws the layer's own contents and does not include sublayersCALayer.render(in:)rasterizes the entire visual tree including all sublayers, which is required for accurate session replay snapshots💡 Motivation and Context
This fixes a regression introduced in PR #4940 where the wrong CALayer method was accidentally merged. The original PR tested
CALayer.render(in:)and showed significant performance improvements (~160ms to ~30-36ms on iPhone 8), butCALayer.draw(in:)was merged instead.For session replay, we need the complete visual representation including all sublayers, making
render(in:)the correct choice, even if the fast view renderer is incomplete.Fixes the incorrect implementation from PR #4940.
💚 How did you test it?
Manual testing with session replay enabled in iOS-Swift sample app.
draw(in:)📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.