chore: Add Sentry DSN so crash reporting works in all builds#1564
Open
developerkunal wants to merge 2 commits into
Open
chore: Add Sentry DSN so crash reporting works in all builds#1564developerkunal wants to merge 2 commits into
developerkunal wants to merge 2 commits into
Conversation
The Sentry DSN was injected at build time via ldflags from a SENTRY_DSN secret. That value has been empty in released binaries since around v1.10, so crash reporting has effectively been disabled, and it cannot work at all for from-source builds such as Homebrew Core. A Sentry DSN is a public, write-only key that is safe to ship inside client binaries, so this hardcodes it as the default. The build-time injection is removed from the release pipeline so every build path (releases, Homebrew Core, and plain go build) reports to Sentry consistently.
Reporting now keys off buildinfo.Version instead of the Sentry DSN. Local builds stamp the version as "dev" (and a plain go build leaves it empty), so ReportException returns early for those and panics re-panic with a real stack trace. Release and Homebrew Core builds carry a real version and continue to report.
bkiran6398
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Hardcodes the Sentry DSN as the default value of
instrumentation.SentryDSN, and removes the build-timeSENTRY_DSNinjection from the release pipeline.A Sentry DSN is a public, write-only key that is safe to ship in client binaries. Hardcoding it means crash reporting works consistently across all build paths, including from-source builds such as Homebrew Core that cannot inject build-time values.
internal/instrumentation/instrumentation.go:SentryDSNnow defaults to the project DSN..goreleaser.yml: removed the-X ...SentryDSNldflag..github/workflows/release.yml: removed the now-unusedSENTRY_DSNenv var.🔬 Testing
Built from source and confirmed the DSN is embedded in the binary, with version stamping unaffected.
📝 Checklist