fix: Wrong Frame Delay when becoming active#6381
Merged
philipphofmann merged 5 commits intomainfrom Oct 10, 2025
Merged
Conversation
The SDK reported false frame delay statistics when it moved from the background to the foreground, which also led to falsely reported app hangs. Fixes GH-6345
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6381 +/- ##
=============================================
+ Coverage 86.744% 86.764% +0.020%
=============================================
Files 439 439
Lines 37238 37242 +4
Branches 17368 17365 -3
=============================================
+ Hits 32302 32313 +11
+ Misses 4891 4886 -5
+ Partials 45 43 -2
... and 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| a4c5ddc | 1239.61 ms | 1266.41 ms | 26.80 ms |
| 08fc5f9 | 1237.84 ms | 1270.06 ms | 32.23 ms |
| f5666e7 | 1227.08 ms | 1260.18 ms | 33.10 ms |
| 7908e84 | 1224.33 ms | 1246.39 ms | 22.06 ms |
| d3f650a | 1225.45 ms | 1241.86 ms | 16.41 ms |
| c122943 | 1210.94 ms | 1233.78 ms | 22.84 ms |
| cc7f629 | 1226.00 ms | 1245.51 ms | 19.51 ms |
| d66f082 | 1227.08 ms | 1247.04 ms | 19.96 ms |
| 04ff3ec | 1220.71 ms | 1253.86 ms | 33.15 ms |
| 7b3399c | 1193.35 ms | 1227.38 ms | 34.03 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| a4c5ddc | 23.75 KiB | 977.30 KiB | 953.55 KiB |
| 08fc5f9 | 23.75 KiB | 995.43 KiB | 971.68 KiB |
| f5666e7 | 23.75 KiB | 963.18 KiB | 939.43 KiB |
| 7908e84 | 23.74 KiB | 872.75 KiB | 849.00 KiB |
| d3f650a | 23.75 KiB | 902.48 KiB | 878.73 KiB |
| c122943 | 23.74 KiB | 926.65 KiB | 902.90 KiB |
| cc7f629 | 23.75 KiB | 878.48 KiB | 854.73 KiB |
| d66f082 | 23.75 KiB | 928.85 KiB | 905.10 KiB |
| 04ff3ec | 23.75 KiB | 880.26 KiB | 856.52 KiB |
| 7b3399c | 23.75 KiB | 946.68 KiB | 922.94 KiB |
Previous results on branch: fix/frames-delay-from-background
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c228d62 | 1227.12 ms | 1267.90 ms | 40.78 ms |
| 780d634 | 1225.86 ms | 1256.44 ms | 30.58 ms |
| bce284a | 1219.55 ms | 1259.43 ms | 39.88 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c228d62 | 23.74 KiB | 987.03 KiB | 963.29 KiB |
| 780d634 | 23.74 KiB | 986.69 KiB | 962.94 KiB |
| bce284a | 23.75 KiB | 987.97 KiB | 964.23 KiB |
itaybre
approved these changes
Oct 9, 2025
philipphofmann
added a commit
that referenced
this pull request
Oct 10, 2025
The SDK reported false frame delay statistics when it moved from the background to the foreground, which also led to falsely reported app hangs. Fixes GH-6345
philipphofmann
added a commit
that referenced
this pull request
Oct 10, 2025
The SDK reported false frame delay statistics when it moved from the background to the foreground, which also led to falsely reported app hangs. Fixes GH-6345
philipphofmann
added a commit
that referenced
this pull request
Oct 10, 2025
The SDK reported false frame delay statistics when it moved from the background to the foreground, which also led to falsely reported app hangs. Fixes GH-6345
philprime
added a commit
that referenced
this pull request
Nov 5, 2025
- 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
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
The SDK reported false frame delay statistics when it moved from the background to the foreground, which also led to falsely reported app hangs.
After merging this PR, I'm going to open up the same PR to v8 and release a hotfix.
💡 Motivation and Context
Fixes GH-6345
💚 How did you test it?
I failed to reproduce the exact problem the user described in GH-6345, and so did the user. I noticed that the SDK calculated wrong frame delay numbers when moving from the background to the foreground, so I added unit tests for these scenarios.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.