Skip to content

Releases: getsentry/sentry-go

0.29.0

10 Sep 08:54
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.29.0.

Breaking Changes

  • Remove the sentrymartini integration (#861)
  • The WrapResponseWriter has been moved from the sentryhttp package to the internal/httputils package. If you've imported it previosuly, you'll need to copy the implementation in your project. (#871)

Features

  • Add new convenience methods to continue a trace and propagate tracing headers for error-only use cases. (#862)

    If you are not using one of our integrations, you can manually continue an incoming trace by using sentry.ContinueTrace() by providing the sentry-trace and baggage header received from a downstream SDK.

    hub := sentry.CurrentHub()
    sentry.ContinueTrace(hub, r.Header.Get(sentry.SentryTraceHeader), r.Header.Get(sentry.SentryBaggageHeader)),

    You can use hub.GetTraceparent() and hub.GetBaggage() to fetch the necessary header values for outgoing HTTP requests.

    hub := sentry.GetHubFromContext(ctx)
    req, _ := http.NewRequest("GET", "http://localhost:3000", nil)
    req.Header.Add(sentry.SentryTraceHeader, hub.GetTraceparent())
    req.Header.Add(sentry.SentryBaggageHeader, hub.GetBaggage())

Bug Fixes

  • Initialize HTTPTransport.limit if nil (#844)
  • Fix sentry.StartTransaction() returning a transaction with an outdated context on existing transactions (#854)
  • Treat Proxy-Authorization as a sensitive header (#859)
  • Add support for the http.Hijacker interface to the sentrynegroni package (#871)
  • Go version >= 1.23: Use value from http.Request.Pattern for HTTP transaction names when using sentryhttp & sentrynegroni (#875)
  • Go version >= 1.21: Fix closure functions name grouping (#877)

Misc

  • Collect span origins (#849)

0.28.1

12 Jun 13:48
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.28.1.

Bug Fixes

  • Implement http.ResponseWriter to hook into various parts of the response process (#837)

0.28.0

27 May 11:16
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.28.0.

Features

  • Add a Fiber performance tracing & error reporting integration (#795)
  • Add performance tracing to the Echo integration (#722)
  • Add performance tracing to the FastHTTP integration (#732)
  • Add performance tracing to the Iris integration (#809)
  • Add performance tracing to the Negroni integration (#808)
  • Add FailureIssueThreshold & RecoveryThreshold to MonitorConfig (#775)
  • Use errors.Unwrap() to create exception groups (#792)
  • Add support for matching on strings for ClientOptions.IgnoreErrors & ClientOptions.IgnoreTransactions (#819)
  • Add http.request.method attribute for performance span data (#786)
  • Accept interface{} for span data values (#784)

Fixes

  • Fix missing stack trace for parsing error in logrusentry (#689)

0.27.0

07 Feb 15:57
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.27.0.

Breaking Changes

  • Exception.ThreadId is now typed as uint64. It was wrongly typed as string before. (#770)

Misc

  • Export Event.Attachments (#771)

0.26.0

10 Jan 16:26
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.26.0.

Breaking Changes

As previously announced, this release removes some methods from the SDK.

  • sentry.TransactionName() use sentry.WithTransactionName() instead.
  • sentry.OpName() use sentry.WithOpName() instead.
  • sentry.TransctionSource() use sentry.WithTransactionSource() instead.
  • sentry.SpanSampled() use sentry.WithSpanSampled() instead.

Features

  • Add WithDescription span option (#751)

    span := sentry.StartSpan(ctx, "http.client", WithDescription("GET /api/users"))
  • Add support for package name parsing in Go 1.20 and higher (#730)

Bug Fixes

  • Apply ClientOptions.SampleRate only to errors & messages (#754)
  • Check if git is available before executing any git commands (#737)

0.25.0

04 Oct 10:43
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.25.0.

Breaking Changes

As previously announced, this release removes two global constants from the SDK.

  • sentry.Version was removed. Use sentry.SDKVersion instead (#727)
  • sentry.SDKIdentifier was removed. Use Client.GetSDKIdentifier() instead (#727)

Features

  • Add ClientOptions.IgnoreTransactions, which allows you to ignore specific transactions based on their name (#717)
  • Add ClientOptions.Tags, which allows you to set global tags that are applied to all events. You can also define tags by setting SENTRY_TAGS_ environment variables (#718)

Bug fixes

  • Fix an issue in the profiler that would cause an infinite loop if the duration of a transaction is longer than 30 seconds (#724)

Misc

  • dsn.RequestHeaders() is not to be removed, though it is still considered deprecated and should only be used when using a custom transport that sends events to the /store endpoint (#720)

0.24.1

13 Sep 13:29
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.24.1.

Bug fixes

  • Prevent a panic in sentryotel.flushSpanProcessor() ((#711))
  • Prevent a panic when setting the SDK identifier (#715)

0.24.0

05 Sep 10:03
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.24.0.

Deprecations

  • sentry.Version to be removed in 0.25.0. Use sentry.SDKVersion instead.
  • sentry.SDKIdentifier to be removed in 0.25.0. Use Client.GetSDKIdentifier() instead.
  • dsn.RequestHeaders() to be removed after 0.25.0, but no earlier than December 1, 2023. Requests to the /envelope endpoint are authenticated using the DSN in the envelope header.

Features

  • Run a single instance of the profiler instead of multiple ones for each Go routine (#655)
  • Use the route path as the transaction names when using the Gin integration (#675)
  • Set the SDK name accordingly when a framework integration is used (#694)
  • Read release information (VCS revision) from debug.ReadBuildInfo (#704)

Bug fixes

  • [otel] Fix incorrect usage of attributes.Value.AsString (#684)
  • Fix trace function name parsing in profiler on go1.21+ (#695)

Misc

0.23.0

01 Aug 16:30
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.23.0.

Features

  • Initial support for Cron Monitoring (#661)

    This is how the basic usage of the feature looks like:

    // 🟑 Notify Sentry your job is running:
    checkinId := sentry.CaptureCheckIn(
      &sentry.CheckIn{
        MonitorSlug: "<monitor-slug>",
        Status:      sentry.CheckInStatusInProgress,
      },
      nil,
    )
    
    // Execute your scheduled task here...
    
    // 🟒 Notify Sentry your job has completed successfully:
    sentry.CaptureCheckIn(
      &sentry.CheckIn{
        ID:          *checkinId,
        MonitorSlug: "<monitor-slug>",
        Status:      sentry.CheckInStatusOK,
      },
      nil,
    )

    A full example of using Crons Monitoring is available here.

    More documentation on configuring and using Crons can be found here.

  • Add support for Event Attachments (#670)

    It's now possible to add file/binary payloads to Sentry events:

    sentry.ConfigureScope(func(scope *sentry.Scope) {
      scope.AddAttachment(&Attachment{
        Filename:    "report.html",
        ContentType: "text/html",
        Payload:     []byte("<h1>Look, HTML</h1>"),
      })
    })

    The attachment will then be accessible on the Issue Details page.

  • Add sampling decision to trace envelope header (#666)

  • Expose SpanFromContext function (#672)

Bug fixes

  • Make Span.Finish a no-op when the span is already finished (#660)

0.22.0

16 Jun 10:27
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.22.0.

This release contains initial profiling support, as well as a few bug fixes and improvements.

Features

  • Initial (alpha) support for profiling (#626)

    Profiling is disabled by default. To enable it, configure both TracesSampleRate and ProfilesSampleRate when initializing the SDK:

    err := sentry.Init(sentry.ClientOptions{
      Dsn: "__DSN__",
      EnableTracing: true,
      TracesSampleRate: 1.0,
      // The sampling rate for profiling is relative to TracesSampleRate. In this case, we'll capture profiles for 100% of transactions.
      ProfilesSampleRate: 1.0,
    })

    More documentation on profiling and current limitations can be found here.

  • Add transactions/tracing support go the Gin integration (#644)

Bug fixes

  • Always set a valid source on transactions (#637)
  • Clone scope.Context in more places to avoid panics on concurrent reads and writes (#638)
  • Fix frames recognized as not being in-app still showing as in-app (#647)