bugsnag/bugsnag-dotnet

Use Ben.Demystifier optionally

btecu opened this issue · 1 comments

btecu commented

Please add an option to use https://github.com/benaadams/Ben.Demystifier.

I tried using it separately before the exception is handled by Bugsnag and it works - it simplifies the stacktrace, however, Bugsnag makes the stacktrace worse (noisier) than what Demystifier outputs.

Hi @btecu

You should be able to customize the error report by adding a beforeNotify callback:
https://docs.bugsnag.com/platforms/dotnet/other/customizing-error-reports/

You could then iterate over the stacktrace and replace the Bugsnag captured trace in report.Event.Exceptions with the one from Ben.Demystifier:
https://docs.bugsnag.com/platforms/dotnet/other/customizing-error-reports/#exceptions