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

Add option to use Ben.Demystifier for cleaner and less confusing stack traces

Open oddgames-david opened this issue 2 years ago • 9 comments

Would be nice to clean up stacktraces using this library (or you guys make plugin architecture for us to override stacktraces?)

image

oddgames-david avatar Apr 06 '22 01:04 oddgames-david

That's an interesting suggestion, thanks for raising this! Especially since the .NET SDK already has Ben.Demystifier as a submodule. I'll look into how that would work and get back to you.

bitsandfoxes avatar Apr 07 '22 12:04 bitsandfoxes

I think I stumbled upon the reason why we're not already doing that: https://github.com/getsentry/sentry-unity/blob/248ca0c4d7ddf6d24185bad92825d036795182b6/src/Sentry.Unity/SentryUnityOptions.cs#L113

bitsandfoxes avatar Apr 12 '22 07:04 bitsandfoxes

Backtrace a unity owned product is using it. Maybe that comment is old?Get Outlook for Android

oddgames-david avatar Apr 12 '22 07:04 oddgames-david

You could try to use the ScriptableConfig to change the StacktraceMode from StackTraceMode.Original to Enhanced (which is the default for the .NET SDK). We would expect this to work on Mono. Let us know what you get on your targetplatform - maybe we can reconsider our approach.

bitsandfoxes avatar Apr 26 '22 15:04 bitsandfoxes

@oddgames-david did you end up setting StackTraceMode.Enhanced mode with mono? What was your experience with the stack traces?

vaind avatar Oct 21 '22 14:10 vaind