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

ANR improvements - Mechanism and docs

Open bruno-garcia opened this issue 10 months ago • 2 comments
trafficstars

Today doesn't seem like we set any Mechanism: https://github.com/getsentry/sentry-unity/blob/bee77f39ad1137cb21082721d1a2b5fa9fc6f83d/src/Sentry.Unity/Integrations/AnrIntegration.cs#L81

The .NET SDK has a function to help set it: https://github.com/getsentry/sentry-dotnet/blob/c2c737b37882ae5a9a34e17de9386eb620f00ba4/src/Sentry/SentryExceptionExtensions.cs#L35

These are used by customers to filter things out in Sentry. As well as a clear way to see where things came from when looking at an event.

Additionally, ANR tends to mean that the app crashed because the UI thread is blocked. (this can also be added to the mechanism description) So might be worth clarifying that this is not the case with Unity.

Mobile: Also worth clarifying in the docs that this detection is not the same as the Android and iOS, and how they differ. And that they automatic instrumentation disables the native detection because they don't work on Unity.

bruno-garcia avatar Jan 09 '25 15:01 bruno-garcia