getsentry / team-mobile

Meta issues for the Mobile team
4 stars 1 forks source link

Align `crashed` and `current` flags on Android and iOS #47

Open marandaneto opened 2 years ago

marandaneto commented 2 years ago

Original PR: https://github.com/getsentry/sentry-docs/pull/1581/ Related DACI: https://www.notion.so/sentry/Thread-isCurrent-UIThread-etc-9ad82725c4af412f950e92acf1e6eba4

on Android: crashed whether the thread is the one that actually caused the error. current whether the thread is the main/UI thread.

current is also used to display the was active label on the issues page, but this is actually not always correct and we'd need to add a dedicated flag for that, See issue.

on iOS: TBD Can you confirm @brustolin ?

The docs: current whether the thread was in the foreground.

brustolin commented 2 years ago

On iOS.

Usually, current is the thread that is running the code (I think this is what docs mean by foreground). This is not true for ANR, we set the ui thread as the current one.

crashed is the one that caused the error.

marandaneto commented 2 years ago

I actually believe that whether the thread was in the foreground. means if the thread was running/scheduled or interrupted/paused/not started, on Java that would be thread.isAlive() && !thread.isInterrupted() but I'm not sure, I don't recall right now.

marandaneto commented 1 year ago

@markushi @romtsn I believe this could make it into the Android SDK v7 since it's a breaking change and a quick win.