Repository navigation
Conversation
PR risk: mediumFor commit Main concerns: public contract, data sent to Sentry, host performance. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
|
📲 Install BuildsAndroid
|
| exception.setValue("Non-fatal ANR"); | ||
| exception.setMechanism(mechanism); | ||
| exceptions = Arrays.asList(exception); | ||
| } |
There was a problem hiding this comment.
Wrong fallback exception type
Low Severity
When there is no culprit stack, the fallback exception sets type to ApplicationNotResponding.class.getName(), the FQCN. AnrCulpritEventHelper instead sets type to ApplicationNotResponding and module to io.sentry.android.core. Hangs without a usable stack therefore show a different exception type and can group apart from sampled non-fatal ANRs even with the same fingerprints.
Reviewed by Cursor Bugbot for commit cabe2f1. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a66ae84. Configure here.
| exception.setType(ApplicationNotResponding.class.getName()); | ||
| exception.setValue("Non-fatal ANR"); | ||
| exception.setMechanism(mechanism); | ||
| exceptions = Arrays.asList(exception); |
There was a problem hiding this comment.
Fallback ANR type uses FQCN
Medium Severity
When a hang has no usable stack samples, the fallback exception sets type to ApplicationNotResponding.class.getName() (the FQCN) and leaves module unset. Culprit events built through AnrCulpritEventHelper instead use simple name plus package. Those two shapes group as different issues, so recovered hangs without samples split from the rest.
Reviewed by Cursor Bugbot for commit a66ae84. Configure here.
| return; | ||
| } | ||
| final long endTimestampMs = record.getStartTimestampMs() + record.getDurationMs(); | ||
| scopes.captureEvent(buildEvent(record, endTimestampMs)); |
There was a problem hiding this comment.
Missing non-fatal ANR marker
Medium Severity
The integration reports a recovered hang and never writes the last_non_fatal_anr marker. A hang that is long enough for Android to still kill the process (for example after backgrounding) can then also be sent as a fatal ANR on the next launch, duplicating the same incident.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a66ae84. Configure here.


Adds
NonFatalAnrIntegration(API 30+) and the optionsnonFatalAnrSampleRateandnonFatalAnrThresholdMs(also as manifest metadata).nonFatalAnrSampleRateis drawn at each hang. Writes thelast_non_fatal_anrmarker for hangs that can also be a fatal ANR.Design: Non-Fatal ANR Architecture (JAVA-777)
🤖 Generated with Claude Code
#skip-changelog