Does Sentry support showing source code in the stacktrace of an event?
Well no replies from Sentry yet. I’ve sent this to support yesterday but no reply from them either. Maybe the community can help me answer this.
I am two days into my trial and just want to know if Sentry can show the source code within the stack trace in the Events screen, or if that isn’t supported.
Hi Jam. Sorry I missed this thread.
It’s correct at the time we don’t support source context for C# events.
That is a feature we’d love to add eventually.
I’m curious in how you’d like to make your source available to Sentry.
Would you be OK with uploading your source to Sentry?
Or would you rather bundle the source inside the PDB of your app?
Another solution would be to use sourcelink. In which case Sentry would need access to your source control server.
@bruno-garcia personally I could see the benefits of either of the methods you mentioned above.
I like the idea of offloading the processing of the data to sentry, so I’m personally a fan of either uploading my source or uploading pdbs that can be mapped to stack traces on the server side. But for me at least the easiest method would be the best IMHO.
I was also initially under the impression that the Azure DevOps integration was able to map the source code via the commits integration, which I still think would be a good way to do it (from an ease of setup standpoint) if it’s possible.
Before I figured out it did nothing, as part of my build process I used the sentry cli to upload my “sourcemaps” (i.e. just the
.cs files) to my on-prem server, so that could also be a potential option too. However, I did run into issues where it would take upwards of 20 minutes to upload the source for a larger project, so it’s not without downsides.