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

fix(deps): update module github.com/getsentry/sentry-go to v0.31.1 #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jan 2, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/getsentry/sentry-go v0.16.0 -> v0.31.1 age adoption passing confidence

Release Notes

getsentry/sentry-go (github.com/getsentry/sentry-go)

v0.31.1: 0.31.1

Compare Source

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

Bug Fixes
  • Correct wrong module name for sentry-go/logrus (#​950)

v0.31.0: 0.31.0

Compare Source

Breaking Changes
  • Remove support for metrics. Read more about the end of the Metrics beta here. (#​914)

  • Remove support for profiling. (#​915)

  • Remove Segment field from the User struct. This field is no longer used in the Sentry product. (#​928)

  • Every integration is now a separate module, reducing the binary size and number of dependencies. Once you update sentry-go to latest version, you'll need to go get the integration you want to use. For example, if you want to use the echo integration, you'll need to run go get github.com/getsentry/sentry-go/echo (#​919).

Features

Add the ability to override hub in context for integrations that use custom context. (#​931)

  • Add HubProvider Hook for sentrylogrus, enabling dynamic Sentry hub allocation for each log entry or goroutine. (#​936)

This change enhances compatibility with Sentry's recommendation of using separate hubs per goroutine. To ensure a separate Sentry hub for each goroutine, configure the HubProvider like this:

hook, err := sentrylogrus.New(nil, sentry.ClientOptions{})
if err != nil {
    log.Fatalf("Failed to initialize Sentry hook: %v", err)
}

// Set a custom HubProvider to generate a new hub for each goroutine or log entry
hook.SetHubProvider(func() *sentry.Hub {
    client, _ := sentry.NewClient(sentry.ClientOptions{})
    return sentry.NewHub(client, sentry.NewScope())
})

logrus.AddHook(hook)
Bug Fixes
  • Add support for closing worker goroutines started by the HTTPTranport to prevent goroutine leaks. (#​894)
client, _ := sentry.NewClient()
defer client.Close()

Worker can be also closed by calling Close() method on the HTTPTransport instance. Close should be called after Flush and before terminating the program otherwise some events may be lost.

transport := sentry.NewHTTPTransport()
defer transport.Close()
Misc

v0.30.0: 0.30.0

Compare Source

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

Features
  • Add sentryzerolog integration (#​857)
  • Add sentryslog integration (#​865)
  • Always set Mechanism Type to generic (#​896)
Bug Fixes
  • Prevent panic in fasthttp and fiber integration in case a malformed URL has to be parsed (#​912)
Misc

Drop support for Go 1.18, 1.19 and 1.20. The currently supported Go versions are the last 3 stable releases: 1.23, 1.22 and 1.21.

v0.29.1: 0.29.1

Compare Source

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

Bug Fixes
  • Correlate errors to the current trace (#​886)
  • Set the trace context when the transaction finishes (#​888)
Misc
  • Update the sentrynegroni integration to use the latest (v3.1.1) version of Negroni (#​885)

v0.29.0: 0.29.0

Compare Source

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

v0.28.1: 0.28.1

Compare Source

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)

v0.28.0: 0.28.0

Compare Source

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)

v0.27.0: 0.27.0

Compare Source

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)

v0.26.0: 0.26.0

Compare Source

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)

v0.25.0: 0.25.0

Compare Source

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)

v0.24.1: 0.24.1

Compare Source

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)

v0.24.0: 0.24.0

Compare Source

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

v0.23.0: 0.23.0

Compare Source

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)

v0.22.0: 0.22.0

Compare Source

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)

v0.21.0: 0.21.0

Compare Source

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

Note: this release includes one breaking change and some deprecations, which are listed below.

Breaking Changes

This change does not apply if you use https://sentry.io

  • Remove support for the /store endpoint (#​631)
    • This change requires a self-hosted version of Sentry 20.6.0 or higher. If you are using a version of self-hosted Sentry (aka on-premise) older than 20.6.0, then you will need to upgrade your instance.
Features
  • Rename four span option functions (#​611, #​624)
    • TransctionSource -> WithTransactionSource
    • SpanSampled -> WithSpanSampled
    • OpName -> WithOpName
    • TransactionName -> WithTransactionName
    • Old functions TransctionSource, SpanSampled, OpName, and TransactionName are still available but are now deprecated and will be removed in a future release.
  • Make client.EventFromMessage and client.EventFromException methods public (#​607)
  • Add client.SetException method (#​607)
    • This allows to set or add errors to an existing Event.
Bug Fixes
  • Protect from panics while doing concurrent reads/writes to Span data fields (#​609)
  • [otel] Improve detection of Sentry-related spans (#​632, #​636)
    • Fixes cases when HTTP spans containing requests to Sentry were captured by Sentry (#​627)
Misc

v0.20.0: 0.20.0

Compare Source

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

Note: this release has some breaking changes, which are listed below.

Breaking Changes
  • Remove the following methods: Scope.SetTransaction(), Scope.Transaction() (#​605)

    Span.Name should be used instead to access the transaction's name.

    For example, the following TracesSampler function should be now written as follows:

    Before:

    TracesSampler: func(ctx sentry.SamplingContext) float64 {
      hub := sentry.GetHubFromContext(ctx.Span.Context())
      if hub.Scope().Transaction() == "GET /health" {
        return 0
      }
      return 1
    },

    After:

    TracesSampler: func(ctx sentry.SamplingContext) float64 {
      if ctx.Span.Name == "GET /health" {
        return 0
      }
      return 1
    },
Features
  • Add Span.SetContext() method (#​599)
    • It is recommended to use it instead of hub.Scope().SetContext when setting or updating context on transactions.
  • Add DebugMeta interface to Event and extend Frame structure with more fields (#​606)
    • More about DebugMeta interface here.
Bug Fixes
  • [otel] Fix missing OpenTelemetry context on some events (#​599, #​605)
  • [otel] Better handling for HTTP span attributes (#​610)
Misc

v0.19.0: 0.19.0

Compare Source

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

Features
  • Add support for exception mechanism metadata (#​564)
    • More about exception mechanisms here.
Bug Fixes
  • [otel] Use the correct "trace" context when sending a Sentry error (#​580)
Misc
  • Drop support for Go 1.17, add support for Go 1.20 (#​563)
    • According to our policy, we're officially supporting the last three minor releases of Go.
  • Switch repository license to MIT (#​583)
    • More about Sentry licensing here.
  • Bump golang.org/x/text minimum required version to 0.3.8 (#​586)

v0.18.0: 0.18.0

Compare Source

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 module

    go 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
  • Add Span.SetDynamicSamplingContext() (#​539)
  • Add various getters for Dsn (#​540)
  • Add SpanOption::SpanSampled (#​546)
  • Add Span.SetData() (#​542)
  • Add Span.IsTransaction() (#​543)
  • Add Span.GetTransaction() method (#​558)

v0.17.0: 0.17.0

Compare Source

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 to ClientOptions (#​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)
  • Attach non-PII/non-sensitive request headers to events when ClientOptions.SendDefaultPii is set to false (#​524)
Misc
  • Clarify how to handle logrus.Fatalf events (#​501)
  • Rename the examples directory to _examples (#​521)
    • This removes an indirect dependency to github.com/golang-jwt/jwt

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Author

renovate bot commented Jan 2, 2025

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 2 additional dependencies were updated
  • The go directive was updated for compatibility reasons

Details:

Package Change
go 1.19 -> 1.23.4
golang.org/x/sys v0.3.0 -> v0.18.0
golang.org/x/text v0.5.0 -> v0.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants