-
-
Notifications
You must be signed in to change notification settings - Fork 32
fix: before raising ANR event, we check ProcessErrorStateInfo if available #412
fix: before raising ANR event, we check ProcessErrorStateInfo if available #412
Conversation
sentry-android-core/src/main/java/io/sentry/android/core/ANRWatchDog.java
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/AnrIntegration.java
Show resolved
Hide resolved
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.
Minor notes but this is huge improvement!
sentry-android-core/src/main/java/io/sentry/android/core/ANRWatchDog.java
Show resolved
Hide resolved
} | ||
boolean isAnr = false; | ||
for (ActivityManager.ProcessErrorStateInfo item : processesInErrorState) { | ||
if (item.condition == NOT_RESPONDING) { |
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.
So this is a best effort since it could give false positive? Meaning there's some process in ANR state but this isn't the current one? Either way would improve a lot already.
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.
it's only the processes of this app, so that's why it's a list. an App can have multiple processes but its not common at all.
sentry-android-core/src/main/java/io/sentry/android/core/AnrIntegration.java
Show resolved
Hide resolved
sentry-android-core/src/test/java/io/sentry/android/core/ANRWatchDogTest.kt
Outdated
Show resolved
Hide resolved
sentry-android-core/src/test/java/io/sentry/android/core/ANRWatchDogTest.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #412 +/- ##
============================================
+ Coverage 59.72% 60.18% +0.45%
- Complexity 790 809 +19
============================================
Files 89 92 +3
Lines 3620 3747 +127
Branches 344 360 +16
============================================
+ Hits 2162 2255 +93
- Misses 1311 1338 +27
- Partials 147 154 +7 Continue to review full report at Codecov.
|
📢 Type of change
📜 Description
fix: before raising ANR event, we check ProcessErrorStateInfo if available
💡 Motivation and Context
ANR events are too noisy
#406
💚 How did you test it?
📝 Checklist
🔮 Next steps