Skip to content

docs(android): document v1 ANR watchdog limitations on Android 10 and below#17482

Open
InterstellarStella wants to merge 1 commit intomasterfrom
InterstellarStella-patch-1
Open

docs(android): document v1 ANR watchdog limitations on Android 10 and below#17482
InterstellarStella wants to merge 1 commit intomasterfrom
InterstellarStella-patch-1

Conversation

@InterstellarStella
Copy link
Copy Markdown
Contributor

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 in
ANRWatchDog.isProcessNotResponding(). Also clarifies that ANR rate
calculated 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

  • Adds a "Known limitations on Android 10 and below" subsection under
    Watchdog (v1).
  • Adds a clarifying <Note> to the ANR Rate section explaining that v1
    rates can under-report.
  • Adds a small troubleshooting tip pointing users at debug logs.

No content was removed; existing copy and configuration examples are
preserved.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Apr 27, 2026 0:41am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Apr 27, 2026 0:41am

Request Review

@codeowner-assignment codeowner-assignment Bot requested a review from a team April 27, 2026 12:32
@InterstellarStella InterstellarStella requested review from romtsn and removed request for a team April 27, 2026 12:32
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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant