sentry-java
sentry-java copied to clipboard
Enrich ANRs happened before Sentry.init
Description
It can happen that there were ANRs prior to the Sentry.init call, which means we wouldn't be able to enrich them as we haven't persisted any information yet. We should fallback to something meaningful, e.g:
- check if the app has been updated in the meantime, and if not just enrich with the current values
- otherwise ...?
Prior art for checking if there was an update https://github.com/square/papa/blob/main/papa/src/main/java/papa/internal/AppUpdateDetector.kt#L103
We could also store data to enrich ANRs similarly to how statup profiling works