
Sentry Go SDK
https://github.com/getsentry/sentry-go- Category
- Developer Tools
- Rank
- No. 358Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- getsentry
- GitHub
- 1.1k stars
- Latest release
- v0.49.0
- Date
About
Official Go SDK for Sentry — error monitoring and performance tracing for Go services.
What it does
A Go client that collects failures, runtime context, breadcrumbs, structured logs, metrics, and trace data, then sends them to Sentry. A central hub binds the client to scoped metadata, while context-aware copies help isolate concurrent or asynchronous work.
Why it's ranked here
A strong choice for teams already using Sentry because it covers several telemetry signals through one configurable library. Sampling, filtering callbacks, trace propagation, custom transports, and granular data collection controls give production services meaningful control over cost, payloads, and sensitive information.
What's good
Scopes attach users, tags, contexts, fingerprints, breadcrumbs, request details, and trace relationships without rebuilding every event. Temporary cloned scopes isolate one-off metadata. The client also bounds error chains, spans, and breadcrumbs, supports synchronous or buffered transport, and provides test doubles for transports, scopes, and log entries.
Tradeoffs
Its support window covers only the two most recent Go releases. Buffered events can be lost unless applications flush before termination, while synchronous delivery requires a different transport choice. The global hub suits common cases, but asynchronous work may require explicit hub handling. Trace filtering accepts URL strings rather than regular expressions.
How to use it well
Use it in Go services that send operational data to Sentry and need errors correlated with traces, logs, metrics, releases, and request context. Configure sampling and data collection deliberately, carry context through asynchronous work, and flush during shutdown. It does not provide the Sentry server, ingestion pipeline, or user interface.
Technical notes+
go.mod declares module github.com/getsentry/sentry-go and Go 1.25.0. sentry.go exposes Init, capture helpers, panic recovery, scope management, and bounded flushing through the global Hub. hub.go protects the hub stack and last event ID with read-write locks, clones scopes for isolation, and supports context-based trace propagation. scope.go applies breadcrumbs, attachments, tags, request data, propagation context, and processors to events, with bounded request-body buffering and data-collection filtering. client.go exposes sampling, filtering hooks, custom transports, proxy and certificate controls, trace continuation, data collection, and telemetry limits. log.go and metrics.go associate records with trace and span IDs and fall back to no-op implementations when unavailable or disabled. Makefile provides build, test, race, coverage, vet, lint, formatting, and module-tidiness targets.
Observed
- License
- MIT License
- Primary language
- Go
- Packaging
- Go module github.com/getsentry/sentry-go, installable with go get
- Interface
- Embedded Go library client
- Runtime requirement
- A Go compiler
- Support policy
- The two most recent Go releases, with toolchain master tested on a best-effort basis
- Verification surface
- Make targets cover tests, race detection, coverage, vet, lint, formatting, and module tidiness
Read from README.md, go.mod, Makefile, doc.go, dsn.go, hub.go, log.go, util.go, mocks.go, scope.go, client.go, option.go, sentry.go, baggage.go, metrics.go.
What it can do
Capture and report runtime errors
Go application errors and exceptions → Error reports sent to Sentry dashboard
Track application performance metrics
Go application execution data → Performance traces and transaction data
Monitor function execution times
Go function calls and operations → Timing data and performance spans
Add contextual data to error reports
User data, tags, and custom context → Enriched error reports with metadata
Filter and sample error events
Configuration rules and error events → Filtered subset of error reports
Integrate with Go HTTP handlers
HTTP requests and responses → Instrumented web application with error tracking
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.