Report app exit reasons
Problem Statement
Having more context on ANR's is always required
Solution Brainstorm
https://developer.android.com/reference/android/app/ApplicationExitInfo#REASON_EXCESSIVE_RESOURCE_USAGE
┆Issue is synchronized with this Jira Improvement by Unito
hi @Angelodaniel
thanks for the suggestion!
We currently report an ANR when we get the REASON_ANR from the system.
We don't receive multiple reasons of the process death, so we cannot add other info to the ANRs, as the only info we receive from the system is REASON_ANR
We will discuss how to make sense of other death reasons, especially if we can add them to general crashes
That makes sense. Maybe we can use exit information for crashes.
For anr, it would be nice to have a correlation between last click action or memory usage or memory issues.
Let's investigate if our DefaultUncaughtExceptionHandler can capture REASON_EXCESSIVE_RESOURCE_USAGE issues as well or not, as we should avoid reporting the same error twice.
The DefaultUncaughtExceptionHandler is not able to catch all the reasons the system reports.
Let's duplicate - or generalize - the AnrV2Integration to catch all the reasons (except REASON_CRASH and probably REASON_CRASH_NATIVE).
Useful reasons include
Nothing prevents us to report all reasons, though
Let's start with having this feature as opt-in.
I'd like to add REASON_LOW_MEMORY(link) as the customer would like to capture that as well. @anshulagarwal06 @markushi
Another one REASON_CRASH_NATIVE
@Angelodaniel we're likely going to report all of the reasons in some way or another and make it configurable, so you don't need to track the list of reasons customers asked for :)
That would be great