-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
chore: Logic for full blocking app hangs #4282
Conversation
Fix a race condition in the SentryFramesTracker and SentryDelayedFramesTracker that sometimes leads to frame delay durations longer than the queried interval of start and end time. This is fixed by moving the previousFrameSystemTimestamp down to the SentryDelayedFramesTracker so we can adequately synchronize it without acquiring extra locks on the main thread.
Add SentryFramesDelayResult containing framesContributingToDelayCount, which is the count for the frames that contributed to the frames delay count. This is required for GH-3492.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4282 +/- ##
=============================================
+ Coverage 91.609% 91.614% +0.004%
=============================================
Files 617 616 -1
Lines 50046 50096 +50
Branches 18097 18010 -87
=============================================
+ Hits 45847 45895 +48
- Misses 4105 4110 +5
+ Partials 94 91 -3
... and 18 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change does not reflect the PR description.
Do you still plan do add changes to this PR?
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
01a28a9 | 1237.24 ms | 1253.24 ms | 16.00 ms |
e072ad1 | 1232.40 ms | 1253.19 ms | 20.80 ms |
43aa39d | 1239.16 ms | 1270.42 ms | 31.26 ms |
2f9c5f9 | 1218.78 ms | 1239.58 ms | 20.80 ms |
f1b1dec | 1234.27 ms | 1249.10 ms | 14.84 ms |
11b2ffa | 1204.86 ms | 1218.16 ms | 13.31 ms |
94e1968 | 1218.20 ms | 1230.57 ms | 12.37 ms |
bb5dc7d | 1240.44 ms | 1266.45 ms | 26.01 ms |
15b8c61 | 1223.16 ms | 1244.83 ms | 21.67 ms |
881a955 | 1209.47 ms | 1225.94 ms | 16.47 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
01a28a9 | 22.85 KiB | 405.39 KiB | 382.54 KiB |
e072ad1 | 21.58 KiB | 625.83 KiB | 604.24 KiB |
43aa39d | 20.76 KiB | 432.82 KiB | 412.06 KiB |
2f9c5f9 | 21.58 KiB | 418.82 KiB | 397.24 KiB |
f1b1dec | 21.58 KiB | 616.14 KiB | 594.56 KiB |
11b2ffa | 22.85 KiB | 412.67 KiB | 389.82 KiB |
94e1968 | 21.58 KiB | 614.73 KiB | 593.15 KiB |
bb5dc7d | 22.85 KiB | 412.98 KiB | 390.13 KiB |
15b8c61 | 20.76 KiB | 419.67 KiB | 398.91 KiB |
881a955 | 22.85 KiB | 407.63 KiB | 384.78 KiB |
Sorry, the stacked PRs messed up the diff. I need to merge main back into here. Then it should be ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new algorithm looks good to me.
P.S.: Anything that prevents us from written the V2 in swift already?
📜 Description
Change the logic for detecting app hangs in the ANRTrackerV2 to use frames delay to detect app hangs. The first step is to only report a fully blocking app hang if the app didn't render a single frame in the
timeoutInterval
of theANRTrackerV2
.It's worth noting that the
SentryANRTrackingIntegrationV2
doesn't exist in the options yet, and furtherwork is required to surface this new feature to our users. Still, we should give this a thorough review. The diff looks huge, but it's mostly tests.
This PR is based on #4279.
#skip-changelog
💡 Motivation and Context
This is required for #3492.
💚 How did you test it?
Unit tests and on a real device.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps