Go sentry-go on Epure (Flush before exit)
sentry-go self-host
Point official sentry-go at Epure, set TracesSampleRate to 0, always Flush before exit, Verify panics become Issues with raw frames.
On this pageShowHide
Point official sentry-go at your Epure host, set TracesSampleRate to 0, and always Flush before exit so CLI and job panics are not dropped. Fixture captured at 0.28.0. Confirm with Verify: 202 Accepted, then an Issues row with raw frames.
You already run Go services (net/http, Gin, Echo, chi, workers, CLIs) on official Sentry SDKs and want exception Issues on a two-container self-host (Rust binary + PostgreSQL 16) without a Go symbol server or APM suite. This how-to is the Go path: Init, CaptureException / Recover, Flush, Verify.
Unique wedge: docs call out Flush before exit for short-lived jobs and CLIs; without it the last event can drop. Fixture line 0.28.0 is honesty, not an exclusive support lock. Bias disclosed: Epure first-party docs.
Primary how-to: Go. Acceptance: Verify. Chooser: Quickstart. Host: Installation. Sibling: Sentry SDK compatible, Epure vs Sentry.
Install sentry-go
Install as docs: go get github.com/getsentry/sentry-go. Keep existing framework middleware. Only the DSN host changes. Repo fixture fixtures/sentry/go/envelope.txt captures SDK version 0.28.0; cite that as a captured line, not as the only supported version.
Init and options
Call sentry.Init once with your Epure DSN. Set TracesSampleRate to 0 because transactions are discarded. Defer sentry.Flush(2 * time.Second) so shutdown drains the transport.
Dsn
- Value
- Required: public key + Epure host + project UUID
Environment
- Value
- Tag for the dashboard filter strip
Release
- Value
- Version string on the issue
TracesSampleRate
- Value
- 0; transactions discarded
| Dimension | Value |
|---|---|
| Dsn | Required: public key + Epure host + project UUID |
| Environment | Tag for the dashboard filter strip |
| Release | Version string on the issue |
| TracesSampleRate | 0; transactions discarded |
Example: Dsn: "http://YOUR_PUBLIC_KEY@localhost:8080/YOUR_PROJECT_ID", Environment: "local", Release: "my-api@0.0.0", TracesSampleRate: 0, then defer sentry.Flush(2 * time.Second).
Flush before exit
Short-lived jobs and CLIs drop the last event if the process exits before the transport drains. Always Flush (or equivalent) on shutdown. Symptom: CLI exits with no issue → call sentry.Flush(2 * time.Second) before os.Exit.
Capture and recover
Use sentry.CaptureException(err) for handled errors. For panics, recover, call sentry.CurrentHub().Recover(rec), Flush, then re-panic if needed. Gin / Echo / chi middleware that already calls CaptureException keeps working after the DSN swap.
Never-send table
CLI exits with no issue
- What to do
- sentry.Flush(2 * time.Second) before os.Exit
401 / 403
- What to do
- Recopy DSN from Settings → SDK connection
202, empty Issues
- What to do
- Match environment chip to Environment
| Dimension | What to do |
|---|---|
| CLI exits with no issue | sentry.Flush(2 * time.Second) before os.Exit |
| 401 / 403 | Recopy DSN from Settings → SDK connection |
| 202, empty Issues | Match environment chip to Environment |
Verify path
After Init and a throw or recover, expect 202 then an issue whose title matches the panic or error string, with a stack as sentry-go sent it. Match the env chip. No SDK yet? Use store curl from Other runtimes / Verify.
Who should use what
Use this guide when the process is Go and you want exception Issues on Epure. Stay on Sentry Cloud if tracing or replay is the daily debug loop. There is no Go symbol server on Epure.
Use this guide if
- You run Go services or CLIs and need sentry-go pointed at Epure.
- You have seen missing last events on short-lived jobs (Flush wedge).
- Gin/Echo/chi already call CaptureException and you only swap DSN.
Read something else if
- You need the multi-runtime scoreboard: Sentry SDK compatible.
- You need JS/TS demangle: Sourcemaps self-hosted verify.
- APM/replay is required: stay on Sentry Cloud (Epure vs Sentry).
Limitations
Epure is not 100% Sentry compatible. There is no Go symbol server; grouping uses raw frames. Traces are not stored. Stack is two Compose services: Rust binary + PostgreSQL 16. Cloud is not live.
- Epure is not 100% Sentry compatible.
- No Go symbol server / demangle.
- Traces are not Epure features; set TracesSampleRate to 0.
- Fixture 0.28.0 is a captured line, not an exclusive support lock.
- Do not invent Gin middleware source or throughput claims.
- Cloud is not live.
Deep links: Go | Verify | Quickstart | Installation.