Improve ANRv2 implementation based on customer feedback#2792
Merged
Conversation
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 496bdfd | 301.22 ms | 343.96 ms | 42.73 ms |
| 8820c5c | 330.60 ms | 416.86 ms | 86.26 ms |
| 9246ed4 | 281.79 ms | 352.08 ms | 70.29 ms |
| 496bdfd | 272.86 ms | 407.33 ms | 134.48 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 496bdfd | 1.72 MiB | 2.28 MiB | 571.82 KiB |
| 8820c5c | 1.72 MiB | 2.28 MiB | 571.82 KiB |
| 9246ed4 | 1.72 MiB | 2.28 MiB | 572.22 KiB |
| 496bdfd | 1.72 MiB | 2.28 MiB | 571.82 KiB |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2792 +/- ##
=========================================
Coverage 81.14% 81.15%
- Complexity 4497 4501 +4
=========================================
Files 348 348
Lines 16677 16685 +8
Branches 2267 2268 +1
=========================================
+ Hits 13532 13540 +8
Misses 2198 2198
Partials 947 947
☔ View full report in Codecov by Sentry. |
markushi
approved these changes
Jun 22, 2023
sentry-android-core/src/main/java/io/sentry/android/core/AnrV2Integration.java
Show resolved
Hide resolved
romtsn
commented
Jun 22, 2023
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 PR introduces various improvement to the existing ANRv2 implementation based on customer feedback, namely:
ApplicationNotRespondingclass from obfuscation so it doesn't look ugly in the issue streamsetReportHistoricalAnrs, when enabled it will report all of the ANRs from thegetHistoricalExitReasonslist. By default, the SDK only reports and enriches the latest ANR and only this one counts towards ANR rate. Hence, this reduces the noise quite a bit, but still leaves the possibility to get all of the ANR reports from the past. Worth noting that once the SDK has been updated to the version with the new implementation, we won't need this feature, because we'll always read the latest ANR on the next app restart. These ANRs are reported with theHistoricalAppExitInfomechanism for distinctionThe message looks like this:
The ANR thread dump attachment looks like this:
💡 Motivation and Context
💚 How did you test it?
Manually and automated
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps