getsentry / sentry-dotnet

Sentry SDK for .NET
https://docs.sentry.io/platforms/dotnet
MIT License
605 stars 206 forks source link

Guidance on the relationship between Sentry and Windows Error Reporting #1148

Open dbruning opened 3 years ago

dbruning commented 3 years ago

Windows has a built-in system "WER", Windows Error Reporting. It's a service that runs in Windows, detects application crashes, and submits information (minidumps) back to Windows. It would be useful if Sentry provided some guidance about WER and the effect of adding Sentry to an app:

Thanks!

bruno-garcia commented 3 years ago

This SDK will capture any errors that happen in managed code (C#, F#, etc). So if you have, for example a desktop app with WPF or WinForms, and it crashes (throw new Exception that goes unhandled), the SDK will capture that and Sentry will alert you. That's unrelated to WER and it shouldn't affect anything related to it. If, on the other hand, you have a native crash (i.e: P/Invoke into a native DLL that segfaults) the .NET SDK will not capture that, since it's not a .NET exception that crashes the process. For that, you'll need native crash support which Sentry also supports through the sentry-native SDK. There's a NuGet package that bundles sentry-native which has some limitations.

That said, to be honest I'm not too familiar with WER. I'm not sure if that's just about minidumps and native crashes or if that's useful for .NET apps too (managed exceptions). I'd love to learn more if you can share how that works.

dbruning commented 3 years ago

Thanks for that guidance. It sounds like WER is an alternative to the native crash support offered by sentry-native. I'm currently trying to sign up for WER, if I'm successful I'll post a bit more info about how it works here.

bruno-garcia commented 3 years ago

Would be great to have more information about how that works. Thank you for offering to help us with it.

dbruning commented 3 years ago

Still trying to sign up for WER! The validation process is painful and slow, I will update this when I know more.

bruno-garcia commented 2 years ago

Hey @dbruning , any update? We'd love to learn more about it too.

dbruning commented 2 years ago

It was a dead-end for me. The process of signing up for WER was terrible and I just never got any data through it. I finally found someone who told me that you need a certain volume of error reports before any will come through; I don't know what that volume is, but I obviously didn't ever get near it. I gave up & implemented my own process to help the user upload dump files saved locally.