getsentry / sentry-unity

Development of Sentry SDK for Unity
https://docs.sentry.io/platforms/unity/
MIT License
206 stars 51 forks source link

Exceptions in breadcrumbs having a link to their error report #1731

Open emrys90 opened 2 months ago

emrys90 commented 2 months ago

It's very common that one exception could cause other exceptions to be triggered as well. This winds up looking like this in the breadcrumb logs: Image

It would be very helpful to either have the stacktrace of errors in their breadcrumb as well, or some link to open the associated event that ties to that previous exception.

bitsandfoxes commented 2 months ago

Hey @emrys90, thanks for the feature request! I can see this being a lot more helpful than the breadcrumbs from the screenshot. The problem with adding the stacktrace to the breadcrumbs is that at the time of writing the logmessage, the stacktrace at that time is very much raw. But at the very least we could try to grab the name of the gameobject or component to give some additional context.

Alternative, we could either control adding the stacktrace via a dedicated option or we look up the Player Settings -> Other Settings -> Stacktrace*.

We're tracking splitting the logging integration from the error capturing here https://github.com/getsentry/sentry-unity/issues/1608