docs(android): document v1 ANR watchdog limitations on Android 10 and below#17482
Open
InterstellarStella wants to merge 1 commit intomasterfrom
Open
docs(android): document v1 ANR watchdog limitations on Android 10 and below#17482InterstellarStella wants to merge 1 commit intomasterfrom
InterstellarStella wants to merge 1 commit intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Comment on lines
+71
to
+72
| 2. Reproduce the ANR. At the moment of the hang you should see an INFO log: `ANR triggered with message: Application Not Responding for at least N ms.` If this line is absent, the watchdog detected the hang but the gate above suppressed the event. | ||
| 3. Cross-reference Google Play Console > Android Vitals > ANRs & crashes. If Play Console shows the ANR but Sentry doesn't, you've hit the v1 limitation, not a misconfiguration. |
There was a problem hiding this comment.
Bug: The troubleshooting advice for missing ANR events may be logically flawed, potentially misguiding developers on the cause of a missing event.
Severity: LOW
Suggested Fix
Verify the order of operations in the sentry-java SDK to confirm if the "ANR triggered" log is generated before or after the isProcessNotResponding() gate check. Update the documentation to accurately reflect the SDK's behavior and prevent confusion during troubleshooting.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: docs/platforms/android/configuration/app-not-respond.mdx#L71-L72
Potential issue: The troubleshooting documentation for Android ANR (Application Not
Responding) events may be logically flawed. It states that if the log message `"ANR
triggered with message: Application Not Responding for at least N ms."` is absent, it
means the SDK suppressed the event after checking
`ActivityManager.getProcessesInErrorState()`. However, the log is likely generated
*before* this check. If this is the case, the absence of the log would indicate the hang
was never detected in the first place, not that it was suppressed. This could misguide
developers into investigating the wrong root cause for a missing ANR event.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
Summary
Documents the known structural limitations of the v1 ANR Watchdog used on
Android 10 and below, where genuine ANRs (including those that produce a
system "App isn't responding" dialog) can be silently dropped by the SDK due
to the
ActivityManager.getProcessesInErrorState()gate inANRWatchDog.isProcessNotResponding(). Also clarifies that ANR ratecalculated from these devices is a lower bound, and adds a short
troubleshooting note for users investigating "missing" ANRs.
Tracking issue: getsentry/sentry-java#5332
Motivation
Multiple users report ANRs that appear in Google Play Console / system ANR
dialog but never reach Sentry on Android 10. Today the docs only mention
that v1 has "false positives", with no acknowledgement of false negatives or
guidance on how to confirm the limitation. This addition gives users a clear
explanation, a way to self-diagnose, and sets correct expectations for ANR
rate dashboards.
Changes
Watchdog (v1).
<Note>to the ANR Rate section explaining that v1rates can under-report.
No content was removed; existing copy and configuration examples are
preserved.