-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server-side source context #177
Comments
This feature would be extremely helpful, especially if |
Is this work scheduled / is there going to be some other way to get the source context in stacktraces without shipping the source alongside built binaries? We love Sentry and love that feature, but we don't want to start shipping source code in our containers that hold our golang web servers just to get slightly more usable stacktraces. I know that "Stack trace linking" via Github integration is now in beta, and that for Javascript there's a way to upload source maps as part of releases, and when I squint that looks like the same thing that we'd want to do here, but whatever the implementation method I'd really like to see the surrounding code inside stacktraces on error pages. |
Sharing here that another viable way to get source code context in stack traces is to use Sentry's GitHub/Gitlab integrations: https://docs.sentry.io/product/integrations/github/#stack-trace-linking |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Hey folks, is #44525 something you could take on as part of this initiative? I'm happy to guide |
@armenzg I assume we could do something with our GitHub integration. Sample error from our profiling ingestion service https://sentry.sentry.io/issues/3908326163/ (internal link). All paths are preserved in the stack trace, so we could fetch the source context with that from a repo. |
Add support for serve-side source context using source bundles.
https://docs.sentry.io/workflow/debug-files/#source-context
Overview
At the moment, the Contextify Frames Integration in the SDK automatically grabs context lines when those are available nearby a running binary.
We document how this can be used when deploying to a serverless platform.
While that integration can be used in certain contexts, it won't help when you (have to) distribute binaries without source code available.
The solution is to add source context on the Sentry server, and that is done by uploading source bundles after building a program.
Development notes
Creating source bundles
Use
sentry-cli
to generate a zip archive with source files and a manifest:Bumpsymbolic
dependency inCargo.toml
to at least getsentry/symbolic@8f9a017(edit: not needed anymore, bumped upstream).
Run
Inspect
manifest.json
in source archiveSee https://github.com/getsentry/symbolic/blob/@{2020.03.03}/debuginfo/src/elf.rs#L92.
References:
TODO
On the SDK, we need:
debug_id
in the event payload along with other required files in theimages
attribute.See https://docs.sentry.io/development/sdk-dev/event-payloads/debugmeta/.
The text was updated successfully, but these errors were encountered: