← All platforms

Go error tracking

Handle the error. Keep the report. The Sentry Go SDK sends the errors worth investigating to your Telebugs server.

~/hoofnotes  go get github.com/getsentry/sentry-go
~/hoofnotes  mkdir -p cmd/check-notes
~/hoofnotes  nvim cmd/check-notes/main.go
package main
import (
"errors"
"log"
"time"
"github.com/getsentry/sentry-go"
)
func main() {
err := sentry.Init(sentry.ClientOptions{
// Copy the complete Telebugs DSN, key and path included.
Dsn: "YOUR_TELEBUGS_DSN",
})
if err != nil {
log.Fatal(err)
}
defer sentry.Flush(5 * time.Second)
// Remove this test once it appears in Telebugs.
sentry.CaptureException(errors.New("Hello from Hoof Notes"))
}
~/hoofnotes  gofmt -w cmd/check-notes/main.go
~/hoofnotes  go run ./cmd/check-notes

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep sentry-go and your integrations. Change the DSN to Telebugs. Same reporting calls, your own server, no Sentry account needed.

Do I choose which errors get reported?

Yes. Go errors are values. Call sentry.CaptureException(err) where it matters. Panic reporting uses the SDK’s recovery helpers or framework middleware; initialization alone doesn’t catch every panic.

Can a report include request details?

Yes. The SDK’s HTTP integrations can attach request context. Telebugs keeps the context sent with the error, so you have more than the message to work with.