Skip to content
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

proposal: debug/buildinfo: add build-id to BuildInfo struct #68186

Open
jerbob92 opened this issue Jun 25, 2024 · 0 comments
Open

proposal: debug/buildinfo: add build-id to BuildInfo struct #68186

jerbob92 opened this issue Jun 25, 2024 · 0 comments
Labels
Milestone

Comments

@jerbob92
Copy link

jerbob92 commented Jun 25, 2024

Proposal Details

Currently a build ID is written to the ELF header (in .note.go.buildid) during compilation. This build-id can be read using the tool go tool buildid {binary}. It's not possible to read this build-id during runtime, without actually opening the binary again to read the ELF header. The code to do it is also in an internal package.

It could be very useful to have this build-id available during runtime. One of the use-cases for this is error tracking and mapping errors to debug symbols, see the following issue in Sentry: getsentry/sentry-cli#1979

If the build-id is available during runtime through debug.ReadBuildInfo(), the Go Sentry SDK could just extract this from the BuildInfo struct and send it together with the rest of the error information to that it can be matched to the debug symbols that are uploaded to Sentry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

2 participants