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

Retain breadcrumbs even if Android kill app process

Open piotrek-chmielowski opened this issue 7 years ago • 4 comments

I have a following scenario:

  1. User uses my app
  2. User clicks home button so the app goes foreground
  3. Android kills app's process in order to free memory
  4. User opens the app again, Android restores its state
  5. Crash happens

In this scenario I have full stack trace and error info on Sentry, however I do not know what happened before app was killed and reopened because I have only breadcrumbs from the beginning of current app process.

Is it possible to force breadcrumbs to be retained during the process death?

piotrek-chmielowski avatar Jan 17 '18 10:01 piotrek-chmielowski

Good idea, I honestly never considered it. We should probably attempt to store all context information on Android.

bretthoerner avatar Jan 17 '18 15:01 bretthoerner

should be pretty straightforward to implement, once ANRv2 lands

romtsn avatar Mar 16 '23 22:03 romtsn

Any update on this?

dharmita1990 avatar Mar 31 '23 08:03 dharmita1990

Ideally we can just restore the breadcrumbs on app-start

markushi avatar May 08 '24 13:05 markushi

Closing as dup of https://github.com/getsentry/sentry-java/issues/3956 and https://github.com/getsentry/sentry-java/issues/2056

markushi avatar Dec 04 '24 14:12 markushi