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

Guidance on the relationship between Sentry and Windows Error Reporting

Open dbruning opened this issue 4 years ago • 6 comments

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:

  • Does Sentry now handle previously-unhandled errors, so that WER won't get involved?
  • Is there a way for Sentry to process exceptions but then still allow the application to crash so that WER gets involved?
  • Is WER still useful even in a Sentry-enabled app, maybe it can detect situations that are too low-level for Sentry to detect (e.g. dotnet runtime failures)?

Thanks!

dbruning avatar Jul 28 '21 22:07 dbruning

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.

bruno-garcia avatar Aug 03 '21 22:08 bruno-garcia

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.

dbruning avatar Aug 10 '21 01:08 dbruning

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

bruno-garcia avatar Aug 25 '21 20:08 bruno-garcia

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

dbruning avatar Aug 25 '21 21:08 dbruning

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

bruno-garcia avatar Apr 20 '22 21:04 bruno-garcia

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.

dbruning avatar Apr 20 '22 22:04 dbruning