Open ueman opened 3 years ago
Worth noting we can align to what Unity is doing here. There's a C# implementation of it, with hooks to inspect the native layer for the result of the previous session (in case it crashed in the native layer).
The .NET SDK supports "Crashed" sessions through the .NET Unhandled Exception handler but Unity (like Flutter) doesn't crash on unhandled errors. So it turns out the "crash free" stats are always 0% when seeing only from the Dart layer perspective. The Dart/C# layers persist the open session so it can close on restart as Abnormal in case it wasn't gracefully closed, but when the native SDK allows, it can call a callback to be able to differentiate between Abnormal and Crash (native):
We need to clarify this in the docs as the 0% crash free on platforms where we don't have native support to flag sessions as crashed might be confusing. Perhaps even adding some support on the product (like showing up Abnormal session rate instead of Crashed).
Perhaps even adding some support on the product (like showing up Abnormal session rate instead of Crashed).
@bruno-garcia Are there any updates on this?
Not yet. @lobsterkatie has brought up something in this area for JavaScript since "crashed" can also be a bit odd there. But nothing changed in Sentry yet
Would be great if this can be supported. I have a desktop application and would be good if could get some stats about the sessions. For me it's simple enough that, I can manually create sessions based on login/logout screen, and just get some stats about 'handled' exceptions.
Any update on this feature. It's very important
@The-RootCause thanks for your interest, we don't have updates on this at this time, but feel free to upvote the comment at the top and track this issue for updates
@The-RootCause I saw you also reacted on the Flutter repo about canvas and Session Replay. Did you mean you believe Replay is important? This issue is about sessions used for crash free rate, for Dart apps other than Flutter. So not really the same thing. We have a wait list for Replay and are working on it: https://sentry.io/lp/mobile-replay-beta/
@bruno-garcia Yes, my question was more concerning Flutter apps. My bad I didn't pay attention to Pure dart. Thank you
Sentry for Dart currently does not support session data used for crash free rate. (note this is NOT about session replay)
On Flutter for iOS, Android and macOS this is not necessarily a problem as the underlying SDK supports it. However that does mean, that there's no support for sessions on web, Windows and Linux.
The relevant documentation is here: https://develop.sentry.dev/sdk/sessions/