Skip to content

Releases: getsentry/sentry-go

0.46.0

21 Apr 12:45

Choose a tag to compare

Breaking Changes πŸ› 

New Features ✨

  • Add internal_sdk_error client report on serialization fail by @giortzisg in #1273
  • Add grpc integration support by @ribice in #938
  • Re-enable Telemetry Processor by default. To disable the behavior use the DisableTelemetryBuffer flag by @giortzisg in #1254
  • Simplify client DSN storage to internal/protocol.Dsn and make it safe to access by @giortzisg in #1254

Internal Changes πŸ”§

Deps

  • Bump github.com/labstack/echo/v5 from 5.0.0 to 5.0.3 in /echo by @dependabot in #1253
  • Bump github.com/labstack/echo/v5 from 5.0.0 to 5.0.3 in /crosstest by @dependabot in #1272
  • Bump golangci-lint action from 2.1.1 to 2.11.4 by @giortzisg in #1265
  • Bump go.opentelemetry.io/otel/sdk from 1.40.0 to 1.43.0 in /otel by @dependabot in #1256
  • Bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp from 1.40.0 to 1.43.0 in /otel/otlp by @dependabot in #1255

Other

0.45.1

13 Apr 08:54

Choose a tag to compare

Bug Fixes πŸ›

  • Add missing TracesSampler fields for SamplingContext by @giortzisg in #1259

0.45.0

09 Apr 09:53

Choose a tag to compare

Breaking Changes πŸ› 

New Features ✨

  • Add OTLP trace exporter via new otel/otlp sub-module by @giortzisg in #1229
    • sentryotlp.NewTraceExporter sends OTel spans directly to Sentry's OTLP endpoint.
    • sentryotel.NewOtelIntegration links Sentry errors, logs, and metrics to the active OTel trace. Works with both direct-to-Sentry and collector-based setups.
    • NewSentrySpanProcessor, NewSentryPropagator, and SentrySpanMap are deprecated and will be removed in 0.47.0. To Migrate use sentryotlp.NewTraceExporter instead:
    // Before
    sentry.Init(sentry.ClientOptions{Dsn: dsn, EnableTracing: true, TracesSampleRate: 1.0})
    
    tp := sdktrace.NewTracerProvider(
    	sdktrace.WithSpanProcessor(sentryotel.NewSentrySpanProcessor()),
    )
    otel.SetTextMapPropagator(sentryotel.NewSentryPropagator())
    otel.SetTracerProvider(tp)
    
    // After:
    sentry.Init(sentry.ClientOptions{
    	Dsn: dsn, EnableTracing: true, TracesSampleRate: 1.0,
    	Integrations: func(i []sentry.Integration) []sentry.Integration {
    		return append(i, sentryotel.NewOtelIntegration())
    	},
    })
    
    exporter, _ := sentryotlp.NewTraceExporter(ctx, dsn)
    tp := sdktrace.NewTracerProvider(sdktrace.WithBatcher(exporter))
    otel.SetTracerProvider(tp)
  • Add IsSensitiveHeader helper to easily distinguish which headers to scrub for PII. by @giortzisg in #1239

Bug Fixes πŸ›

Internal Changes πŸ”§

Deps

Other

0.44.1

24 Mar 14:39

Choose a tag to compare

Note

v0.44.0 had to be released as v0.44.1 due to a technical issue.

New Features ✨

  • Add RemoveAttribute api on the scope. by @giortzisg in #1224
  • Deprecate Scope.SetExtra, Scope.SetExtras, and Scope.RemoveExtra in favor of Scope.SetAttributes and Scope.RemoveAttribute by @giortzisg in #1224
    • The recommended migration path is to use SetAttributes to attach values to logs and metrics. Note that attributes do not appear on error events; if you only capture errors, use SetTag or SetContext instead.
    • Before:
    scope.SetExtra("key.string", "str")
    scope.SetExtra("key.int", 42)
    • After (for error events) β€” use tags and contexts:
    scope.SetTag("key.string", "str")
    scope.SetContext("my_data", sentry.Context{"key.int": 42})
    • After (for logs and metrics) β€” use attributes:
    scope.SetAttributes(
        attribute.String("key.string", "str"),
        attribute.Int("key.int", 42),
    )
  • Add support for homogenous arrays by @giortzisg in #1203
  • Add support for client reports by @giortzisg in #1192
  • Add org id propagation in sentry_baggage by @giortzisg in #1210
  • Add OrgID and StrictTraceContinuation client options. by @giortzisg in #1210
  • Add the option to set attributes on the scope by @giortzisg in #1208

Bug Fixes πŸ›

  • (serialization) Pre-serialize mutable event fields to prevent race panics by @giortzisg in #1214
  • Use HEROKU_BUILD_COMMIT with HEROKU_SLUG_COMMIT as fallback by @ericapisani in #1220

Internal Changes πŸ”§

Ai

Deps

  • Bump github.com/buger/jsonparser from 1.1.1 to 1.1.2 in /zerolog by @dependabot in #1231
  • Bump github.com/gofiber/fiber/v2 from 2.52.11 to 2.52.12 in /fiber by @dependabot in #1209

Other

0.44.0

24 Mar 13:40
65538eb

Choose a tag to compare

Note

v0.44.0 had to be released as v0.44.1 due to a technical issue.

New Features ✨

  • Add RemoveAttribute api on the scope. by @giortzisg in #1224
  • Deprecate Scope.SetExtra, Scope.SetExtras, and Scope.RemoveExtra in favor of Scope.SetAttributes and Scope.RemoveAttribute by @giortzisg in #1224
    • The recommended migration path is to use SetAttributes to attach values to logs and metrics. Note that attributes do not appear on error events; if you only capture errors, use SetTag or SetContext instead.
    • Before:
    scope.SetExtra("key.string", "str")
    scope.SetExtra("key.int", 42)
    • After (for error events) β€” use tags and contexts:
    scope.SetTag("key.string", "str")
    scope.SetContext("my_data", sentry.Context{"key.int": 42})
    • After (for logs and metrics) β€” use attributes:
    scope.SetAttributes(
        attribute.String("key.string", "str"),
        attribute.Int("key.int", 42),
    )
  • Add support for homogenous arrays by @giortzisg in #1203
  • Add support for client reports by @giortzisg in #1192
  • Add org id propagation in sentry_baggage by @giortzisg in #1210
  • Add OrgID and StrictTraceContinuation client options. by @giortzisg in #1210
  • Add the option to set attributes on the scope by @giortzisg in #1208

Bug Fixes πŸ›

  • (serialization) Pre-serialize mutable event fields to prevent race panics by @giortzisg in #1214
  • Use HEROKU_BUILD_COMMIT with HEROKU_SLUG_COMMIT as fallback by @ericapisani in #1220

Internal Changes πŸ”§

Ai

Deps

  • Bump github.com/buger/jsonparser from 1.1.1 to 1.1.2 in /zerolog by @dependabot in #1231
  • Bump github.com/gofiber/fiber/v2 from 2.52.11 to 2.52.12 in /fiber by @dependabot in #1209

Other

0.43.0

24 Feb 14:18

Choose a tag to compare

Breaking Changes πŸ› 

  • Add support for go 1.26 by @giortzisg in #1193
    • bump minimum supported go version to 1.24
  • change type signature of attributes for Logs and Metrics. by @giortzisg in #1205
    • users are not supposed to modify Attributes directly on the Log/Metric itself, but this is still is a breaking change on the type.
  • Send uint64 overflowing attributes as numbers. by @giortzisg in #1198
    • The SDK was converting overflowing uint64 attributes to strings for slog and logrus integrations. To eliminate double types for these attributes, the SDK now sends the overflowing attribute as is, and lets the server handle the overflow appropriately.
    • It is expected that overflowing unsigned integers would now get dropped, instead of converted to strings.

New Features ✨

Bug Fixes πŸ›

Internal Changes πŸ”§

Deps

Other

0.42.0

27 Jan 10:23

Choose a tag to compare

Breaking Changes πŸ› 

  • refactor Telemetry Processor to use TelemetryItem instead of ItemConvertible by @giortzisg in #1180
    • remove ToEnvelopeItem from single log items
    • rename TelemetryBuffer to Telemetry Processor to adhere to spec
    • remove unsed ToEnvelopeItem(dsn) from Event.

New Features ✨

  • Add metric support by @aldy505 in #1151
    • support for three metric methods (counter, gauge, distribution)
    • custom metric units
    • unexport batchlogger

Internal Changes πŸ”§

Release

  • Fix changelog-preview permissions by @BYK in #1181
  • Switch from action-prepare-release to Craft by @BYK in #1167

Other

0.41.0

15 Jan 16:07

Choose a tag to compare

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

Features

  • Add HTTP client integration for distributed tracing via sentryhttpclient package (#876)
    • Provides an http.RoundTripper implementation that automatically creates spans for outgoing HTTP requests
    • Supports trace propagation targets configuration via WithTracePropagationTargets option
    • Example usage:
      import sentryhttpclient "github.com/getsentry/sentry-go/httpclient"
      
      roundTripper := sentryhttpclient.NewSentryRoundTripper(nil)
      client := &http.Client{
          Transport: roundTripper,
      }
  • Add ClientOptions.PropagateTraceparent option to control W3C traceparent header propagation in outgoing HTTP requests (#1161)
  • Add SpanID field to structured logs (#1169)

0.40.0

27 Nov 15:59

Choose a tag to compare

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

Bug Fixes

  • Disable DisableTelemetryBuffer flag and noop Telemetry Buffer, to prevent a panic at runtime (#1149).

0.39.0

24 Nov 15:11

Choose a tag to compare

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

Features

  • Drop events from the telemetry buffer when rate-limited or transport is full, allowing the buffer queue to empty itself under load (#1138).

Bug Fixes

  • Fix scheduler's hasWork() method to check if buffers are ready to flush. The previous implementation was causing CPU spikes (#1143).