sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Enrich ANRs happened before Sentry.init

Open romtsn opened this issue 1 year ago • 2 comments

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 ...?

romtsn avatar Mar 27 '24 22:03 romtsn

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

romtsn avatar Apr 03 '24 13:04 romtsn