Skip to content

Releases: getsentry/sentry-go

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).

0.38.0

17 Nov 10:59

Choose a tag to compare

Breaking Changes

Features

  • Introduce a new async envelope transport and telemetry buffer to prioritize and batch events (#1094, #1093, #1107).

    • Advantages:
      • Prioritized, per-category buffers (errors, transactions, logs, check-ins) reduce starvation and improve resilience under load
      • Batching for high-volume logs (up to 100 items or 5s) cuts network overhead
      • Bounded memory with eviction policies
      • Improved flush behavior with context-aware flushing
  • Add ClientOptions.DisableTelemetryBuffer to opt out and fall back to the legacy transport layer (HTTPTransport / HTTPSyncTransport).

    err := sentry.Init(sentry.ClientOptions{
      Dsn: "__DSN__",
      DisableTelemetryBuffer: true, // fallback to legacy transport
    })

Notes

  • If a custom Transport is provided, the SDK automatically disables the telemetry buffer and uses the legacy transport for compatibility.

0.37.0

13 Nov 13:41

Choose a tag to compare

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

Breaking Changes

  • Behavioral change for the TraceIgnoreStatusCodes option. The option now defaults to ignoring 404 status codes (#1122).

Features

  • Add sentry.origin attribute to structured logs to identify log origin for slog and logrus integrations (auto.log.slog, auto.log.logrus) (#1121).

Bug Fixes

  • Fix slog event handler to use the initial context, ensuring events use the correct hub/span when the emission context lacks one (#1133).
  • Improve exception chain processing by checking pointer values when tracking visited errors, avoiding instability for certain wrapped errors (#1132).

Misc

  • Bump golang.org/x/net to v0.38.0 (#1126).

0.36.2

28 Oct 10:48

Choose a tag to compare

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

Bug Fixes

  • Fix context propagation for logs to ensure logger instances correctly inherit span and hub information from their creation context (#1118)
    • Logs now properly propagate trace context from the logger's original context, even when emitted in a different context
    • The logger will first check the emission context, then fall back to its creation context, and finally to the current hub

0.36.1

21 Oct 13:22

Choose a tag to compare

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

Bug Fixes

  • Prevent panic when converting error chains containing non-comparable error types by using a safe fallback for visited detection in exception conversion (#1113)

0.36.0

14 Oct 08:45

Choose a tag to compare

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

Breaking Changes

  • Behavioral change for the MaxBreadcrumbs client option. Removed the hard limit of 100 breadcrumbs, allowing users to set a larger limit and also changed the default limit from 30 to 100 (#1106))

  • The changes to error handling (#1075) will affect issue grouping. It is expected that any wrapped and complex errors will be grouped under a new issue group.

Features

  • Add support for improved issue grouping with enhanced error chain handling (#1075)

    The SDK now provides better handling of complex error scenarios, particularly when dealing with multiple related errors or error chains. This feature automatically detects and properly structures errors created with Go's errors.Join() function and other multi-error patterns.

    // Multiple errors are now properly grouped and displayed in Sentry
    err1 := errors.New("err1")
    err2 := errors.New("err2") 
    combinedErr := errors.Join(err1, err2)
    
    // When captured, these will be shown as related exceptions in Sentry
    sentry.CaptureException(combinedErr)
  • Add TraceIgnoreStatusCodes option to allow filtering of HTTP transactions based on status codes (#1089)

    • Configure which HTTP status codes should not be traced by providing single codes or ranges
    • Example: TraceIgnoreStatusCodes: [][]int{{404}, {500, 599}} ignores 404 and server errors 500-599

Bug Fixes

  • Fix logs being incorrectly filtered by BeforeSend callback (#1109)
    • Logs now bypass the processEvent method and are sent directly to the transport
    • This ensures logs are only filtered by BeforeSendLog, not by the error/message BeforeSend callback

Misc

  • Add support for Go 1.25 and drop support for Go 1.22 (#1103)

0.35.3

15 Sep 14:28

Choose a tag to compare

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

Bug Fixes

  • Add missing rate limit categories (#1082)

0.35.2

10 Sep 10:26

Choose a tag to compare

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

Bug Fixes

  • Fix OpenTelemetry spans being created as transactions instead of child spans (#1073)

Misc

  • Add MockTransport to test clients for improved testing (#1071)

0.35.1

13 Aug 10:16

Choose a tag to compare

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

Bug Fixes

  • Fix race conditions when accessing the scope during logging operations (#1050)
  • Fix nil pointer dereference with malformed URLs when tracing is enabled in fasthttp and fiber integrations (#1055)

Misc

  • Bump github.com/gofiber/fiber/v2 from 2.52.5 to 2.52.9 in /fiber (#1067)

0.35.0

31 Jul 21:07

Choose a tag to compare

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

Breaking Changes

  • Changes to the logging API (#1046)

The logging API now supports a fluent interface for structured logging with attributes:

// usage before
logger := sentry.NewLogger(ctx)
// attributes weren't being set permanently
logger.SetAttributes(
    attribute.String("version", "1.0.0"),
)
logger.Infof(ctx, "Message with parameters %d and %d", 1, 2)

// new behavior
ctx := context.Background()
logger := sentry.NewLogger(ctx)

// Set permanent attributes on the logger
logger.SetAttributes(
    attribute.String("version", "1.0.0"),
)

// Chain attributes on individual log entries
logger.Info().
    String("key.string", "value").
    Int("key.int", 42).
    Bool("key.bool", true).
    Emitf("Message with parameters %d and %d", 1, 2)

Bug Fixes

  • Correctly serialize FailureIssueThreshold and RecoveryThreshold onto check-in payloads (#1060)