-
-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentry and unhandled exceptions #187
Comments
Thanks for the insight. I think we were getting the behavior of the AppDomain exceptions not marked as "Unhandled". In this case I assume just getting rid of our Though, not sure if our App Shutdown and |
Right, the Sentry SDK will already deal with the NLog log levels From our docs, you can configure it though:
Before calling |
This issue is stale because it has been open 30 days with no activity. Remove the stale label or comment, else this will be closed in 5 days. |
This issue was closed because it has been stale for 5 days with no activity. |
This isn't really an issue, just sharing some details about Sentry: I was peeking at the API usage of Sentry and noticed you have your own implementation of UnhandledException:
StabilityMatrix/StabilityMatrix/App.xaml.cs
Lines 394 to 397 in 3866e57
Sentry sets the
mechanism
, which helps display crashes in Sentry vs non-crashes. With the read bannerunhandled
:https://github.com/getsentry/sentry-dotnet/blob/407dc28dbd7f1c29059fc509a886b114a2c75b0b/src/Sentry/Integrations/AppDomainUnhandledExceptionIntegration.cs#L32-L47
For example, non-crash vs crashed:
Sentry by default de-duplicates a capture that involves the same exception instance. So the second attempt to capture it will just drop the event:
https://github.com/getsentry/sentry-dotnet/blob/407dc28dbd7f1c29059fc509a886b114a2c75b0b/src/Sentry/Internal/DuplicateEventDetectionEventProcessor.cs#L14-L28
So it's possible that your code trying to capture the event with Sentry is not really resulting in a capture. Or, if yours run before Sentry's (you'd notice the
unhandled
missing), Sentry's default unhandled exception handling is not capturing it, but at least it'sFlush
is running. You can disable the default Sentry behavior:https://docs.sentry.io/platforms/dotnet/configuration/disable-integrations/#disableappdomainunhandledexceptioncapture
But I'd recommend keeping the Sentry default integration, as we might continue to improve it and you get that for free. If you decide to remove it, worth adding
Flush
to your own, as we did.One smaller thing:
Enhanced
is the default mode. We'd just not use that if not possible (e.g: Unity, NativeAOT, etc):StabilityMatrix/StabilityMatrix/App.xaml.cs
Line 95 in 3866e57
https://github.com/getsentry/sentry-dotnet/blob/407dc28dbd7f1c29059fc509a886b114a2c75b0b/src/Sentry/SentryOptions.cs#L866
The text was updated successfully, but these errors were encountered: