Releases: getsentry/sentry-go
0.18.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.18.0.
This release contains initial support for OpenTelemetry and various other bug fixes and improvements.
Note: This is the last release supporting Go 1.17.
Features
-
Initial support for OpenTelemetry.
You can now send all your OpenTelemetry spans to Sentry.Install the
otel
modulego get github.com/getsentry/sentry-go \ github.com/getsentry/sentry-go/otel
Configure the Sentry and OpenTelemetry SDKs
import ( "go.opentelemetry.io/otel" sdktrace "go.opentelemetry.io/otel/sdk/trace" "github.com/getsentry/sentry-go" "github.com/getsentry/sentry-go/otel" // ... ) // Initlaize the Sentry SDK sentry.Init(sentry.ClientOptions{ Dsn: "__DSN__", EnableTracing: true, TracesSampleRate: 1.0, }) // Set up the Sentry span processor tp := sdktrace.NewTracerProvider( sdktrace.WithSpanProcessor(sentryotel.NewSentrySpanProcessor()), // ... ) otel.SetTracerProvider(tp) // Set up the Sentry propagator otel.SetTextMapPropagator(sentryotel.NewSentryPropagator())
You can read more about using OpenTelemetry with Sentry in our docs.
Bug Fixes
- Do not freeze the Dynamic Sampling Context when no Sentry values are present in the baggage header (#532)
- Create a frozen Dynamic Sampling Context when calling
span.ToBaggage()
(#566) - Fix baggage parsing and encoding in vendored otel package (#568)
Misc
0.17.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.17.0.
This release contains a new BeforeSendTransaction
hook option and corrects two regressions introduced in 0.16.0
.
Features
- Add
BeforeSendTransaction
hook toClientOptions
(#517)- Here's an example of how BeforeSendTransaction can be used to modify or drop transaction events.
Bug Fixes
- Do not crash in Span.Finish() when the Client is empty (#520)
- Fixes #518
- Attach non-PII/non-sensitive request headers to events when
ClientOptions.SendDefaultPii
is set tofalse
(#524)- Fixes #523
Misc
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
Bug Fixes
0.15.0
0.14.0
- feat: Add function to continue from trace string (#434)
- feat: Add
max-depth
options (#428) - [breaking] ref: Use a
Context
type mapping to amap[string]interface{}
for all event contexts (#444) - [breaking] ref: Replace deprecated
ioutil
pkg withos
&io
(#454) - ref: Optimize
stacktrace.go
from size and speed (#467) - ci: Test against
go1.19
andgo1.18
, dropgo1.16
andgo1.15
support (#432, #477) - deps: Dependency update to fix CVEs (#462, #464, #477)
NOTE: This version drops support for Go 1.16 and Go 1.15. The currently supported Go versions are the last 3 stable releases: 1.19, 1.18 and 1.17.
v0.13.0
- ref: Change DSN ProjectID to be a string (#420)
- fix: When extracting PCs from stack frames, try the
PC
field (#393) - build: Bump gin-gonic/gin from v1.4.0 to v1.7.7 (#412)
- build: Bump Go version in go.mod (#410)
- ci: Bump golangci-lint version in GH workflow (#419)
- ci: Update GraphQL config with appropriate permissions (#417)
- ci: Add craft release automation (#422)
v0.12.0
- feat: Automatic Release detection (#363, #369, #386, #400)
- fix: Do not change Hub.lastEventID for transactions (#379)
- fix: Do not clear LastEventID when events are dropped (#382)
- Updates to documentation (#366, #385)
NOTE:
This version drops support for Go 1.14, however no changes have been made that would make the SDK not work with Go 1.14. The currently supported Go versions are the last 3 stable releases: 1.15, 1.16 and 1.17.
There are two behavior changes related to LastEventID
, both of which were intended to align the behavior of the Sentry Go SDK with other Sentry SDKs.
The new automatic release detection feature makes it easier to use Sentry and separate events per release without requiring extra work from users. We intend to improve this functionality in a future release by utilizing information that will be available in runtime starting with Go 1.18. The tracking issue is #401.
v0.11.0
- feat(transports): Category-based Rate Limiting (#354)
- feat(transports): Report User-Agent identifying SDK (#357)
- fix(scope): Include event processors in clone (#349)
- Improvements to
go doc
documentation (#344, #350, #351) - Miscellaneous changes to our testing infrastructure with GitHub Actions
(57123a40, #128, #338, #345, #346, #352, #353, #355)
NOTE:
This version drops support for Go 1.13. The currently supported Go versions are the last 3 stable releases: 1.14, 1.15 and 1.16.
Users of the tracing functionality (StartSpan
, etc) should upgrade to this version to benefit from separate rate limits for errors and transactions.
There are no breaking changes and upgrading should be a smooth experience for all users.
v0.10.0
- feat: Debug connection reuse (#323)
- fix: Send root span data as
Event.Extra
(#329) - fix: Do not double sample transactions (#328)
- fix: Do not override trace context of transactions (#327)
- fix: Drain and close API response bodies (#322)
- ci: Run tests against Go tip (#319)
- ci: Move away from Travis in favor of GitHub Actions (#314) (#321)
v0.9.0
- feat: Initial tracing and performance monitoring support (#285)
- doc: Revamp sentryhttp documentation (#304)
- fix: Hub.PopScope never empties the scope stack (#300)
- ref: Report Event.Timestamp in local time (#299)
- ref: Report Breadcrumb.Timestamp in local time (#299)
NOTE:
This version introduces support for Sentry's Performance Monitoring.
The new tracing capabilities are beta, and we plan to expand them on future versions. Feedback is welcome, please open new issues on GitHub.
The sentryhttp
package got better API docs, an updated usage example and support for creating automatic transactions as part of Performance Monitoring.