From db367228890050b1e69ec7df5138a12d8a909de2 Mon Sep 17 00:00:00 2001 From: Michi Hoffmann Date: Mon, 5 Dec 2022 15:50:08 +0100 Subject: [PATCH 1/3] Update CHANGELOG.md Update CHANGELOG.md Update CHANGELOG.md Update CHANGELOG.md Update CHANGELOG.md Update CHANGELOG.md --- CHANGELOG.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 164ccce93..e38fb08c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,55 @@ # Changelog -- *[breaking]* ref: Unify TracesSampler (#444) +## 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` or `TracesSampler`, this option is **required** to enable performance monitoring. + + ```go + sentry.Init(sentry.ClientOptions{ + EnableTracing: true, + TracesSampleRate: 1.0, + }) + ``` +- Unify TracesSampler [#498](https://github.com/getsentry/sentry-go/pull/498) + - `TracesSampler` was changed to a callback that must return a `float64` between `0.0` and `1.0`. + + For example, you can apply a sample rate of `1.0` (100%) to all `/api` transactions, and a sample rate of `0.5` (50%) to all other transactions. + You can read more about this in our [SDK docs](https://docs.sentry.io/platforms/go/configuration/filtering/#using-sampling-to-filter-transaction-events). + + ```go + 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](https://github.com/sirupsen/logrus) to Sentry. + - Have a look at our [logrus examples](https://github.com/getsentry/sentry-go/blob/master/example/logrus/main.go) on how to use the integration. +- Add support for Dynamic Sampling [#491](https://github.com/getsentry/sentry-go/pull/491) + - You can read more about Dynamic Sampling in our [prodcut docs](https://docs.sentry.io/product/data-management-settings/dynamic-sampling/). +- Add detailed logging about the reason transactions are being dropped. + - You can enable SDK logging via `sentry.ClientOptions.Debug: true`. + +### Bug Fixes + +- Do not clone the hub when calling `StartTransaction` [#505](https://github.com/getsentry/sentry-go/pull/505) + - Fixes [#502](https://github.com/getsentry/sentry-go/issues/502) ## 0.15.0 From dd21de61375ae2c8a4a778b30b9998ad22a1094c Mon Sep 17 00:00:00 2001 From: Michi Hoffmann Date: Tue, 6 Dec 2022 17:29:51 +0100 Subject: [PATCH 2/3] Update CHANGELOG.md Co-authored-by: Anton Ovchinnikov --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e38fb08c1..0f6b081e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,7 @@ Due to ongoing work towards a stable API for `v1.0.0`, we sadly had to include t - Send errors logged with [Logrus](https://github.com/sirupsen/logrus) to Sentry. - Have a look at our [logrus examples](https://github.com/getsentry/sentry-go/blob/master/example/logrus/main.go) on how to use the integration. - Add support for Dynamic Sampling [#491](https://github.com/getsentry/sentry-go/pull/491) - - You can read more about Dynamic Sampling in our [prodcut docs](https://docs.sentry.io/product/data-management-settings/dynamic-sampling/). + - You can read more about Dynamic Sampling in our [product docs](https://docs.sentry.io/product/data-management-settings/dynamic-sampling/). - Add detailed logging about the reason transactions are being dropped. - You can enable SDK logging via `sentry.ClientOptions.Debug: true`. From 51f211ade047d732e975f201675ac7579e9ea676 Mon Sep 17 00:00:00 2001 From: Michi Hoffmann Date: Tue, 6 Dec 2022 17:30:01 +0100 Subject: [PATCH 3/3] Update CHANGELOG.md Co-authored-by: Anton Ovchinnikov --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f6b081e6..ae9a6c29e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 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. +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