0.16.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.16.0.
Due to ongoing work towards a stable API for v1.0.0
, we sadly had to include two breaking changes in this release.
Breaking Changes
- Add
EnableTracing
, a boolean option flag to enable performance monitoring (false
by default).-
If you're using
TracesSampleRate
orTracesSampler
, this option is required to enable performance monitoring.sentry.Init(sentry.ClientOptions{ EnableTracing: true, TracesSampleRate: 1.0, })
-
- Unify TracesSampler #498
-
TracesSampler
was changed to a callback that must return afloat64
between0.0
and1.0
.For example, you can apply a sample rate of
1.0
(100%) to all/api
transactions, and a sample rate of0.5
(50%) to all other transactions.
You can read more about this in our SDK docs.sentry.Init(sentry.ClientOptions{ TracesSampler: sentry.TracesSampler(func(ctx sentry.SamplingContext) float64 { hub := sentry.GetHubFromContext(ctx.Span.Context()) name := hub.Scope().Transaction() if strings.HasPrefix(name, "GET /api") { return 1.0 } return 0.5 }), }
-
Features
- Send errors logged with Logrus to Sentry.
- Have a look at our logrus examples on how to use the integration.
- Add support for Dynamic Sampling #491
- You can read more about Dynamic Sampling in our product docs.
- Add detailed logging about the reason transactions are being dropped.
- You can enable SDK logging via
sentry.ClientOptions.Debug: true
.
- You can enable SDK logging via