getsentry / raven-go

Sentry client in Go
https://sentry.io
BSD 3-Clause "New" or "Revised" License
561 stars 148 forks source link

Code context when deploying only binary #249

Open grongor opened 5 years ago

grongor commented 5 years ago

Hey, maybe I'm doing something wrong or I'm missing some config or whatnot, but I'm not able to get source code context to appear in the Sentrt when running the compiled binary on another machine (typical use: build on CI, deploy to another server (bin only), run there). The paths are relative to where I built the binary and the source code is missing (I see only file/function names).

image

micahcoffman commented 5 years ago

+1 on being able to resolve context somehow when binary is compiled in CI and run as elsewhere

kamilogorek commented 5 years ago

Go binaries doesn't provide enough information to do that, as they are compiled down to machine code. It'd be possible to somehow perform mapping to external files, but environment running the binary would still need access to the corresponding files.

micahcoffman commented 5 years ago

Absolutely, but it'd be better than nothing to be able to provide some source code if a user wants a mapping. Like the ability to add sourcemaps for JS.