Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 0.16.0 #509

Merged
merged 3 commits into from Dec 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
51 changes: 50 additions & 1 deletion 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.
cleptric marked this conversation as resolved.
Show resolved Hide resolved

### 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/).
cleptric marked this conversation as resolved.
Show resolved Hide resolved
- 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

Expand Down