github getsentry/sentry-go v0.47.0
0.47.0

10 hours ago

Breaking Changes 🛠

  • Fix transaction_info source getting set incorrectly across HTTP middleware integrations (http, fasthttp, fiber). Users should now expect traces to properly get grouped with their parameterized path. Transactions in affected integrations may regroup after upgrading. by @giortzisg in #1325
  • remove deprecatedotel.NewSentrySpanProcessor. Users should now use the sentryotlp.NewTraceExporter instead by @giortzisg in #1307
    // 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)
  • Enable logs by default to skip double allow behavior. Enabling logs now happens once when setting up either sentry.NewLogger or any supported integration. Also the EnableLogs flag changes to DisableLogs for a global override switch by @giortzisg in #1306
  • Remove the ContextifyFrames integration. The recommended way to add source context is SCM by @giortzisg in #1302

New Features ✨

  • Add fiber v3 integration by @giortzisg in #1324
  • Bump fasthttp from 1.51.0 to 1.71.0 by @giortzisg in #1324
  • Add sentrysql SQL tracing integration by @giortzisg in #1305
    • Supports multiple integration paths depending on how your app opens database connections: sentrysql.Open(...), sentrysql.OpenDB(...), and wrapped drivers/connectors for custom setups.
    • Database metadata is not inferred in every setup. If the database name is not discoverable automatically, pass sentrysql.WithDatabaseName(...) so spans are populated correctly.
    • Example:
     // Simple driver-based setup
     db, err := sentrysql.Open("sqlite", ":memory:",
         sentrysql.WithDatabaseSystem(sentrysql.SystemSQLite),
         sentrysql.WithDatabaseName("main"),
     )

Internal Changes 🔧

Deps

  • Sync go.work by @giortzisg in #1326
  • Bump github.com/stretchr/testify from 1.8.4 to 1.11.1 by @giortzisg in #1326
  • Bump github.com/google/go-cmp from 0.5.9 to 0.7.0 by @giortzisg in #1326
  • Bump getsentry/github-workflows from 71588ddf95134f804e82c5970a8098588e2eaecd to c802283cd9075b7a2b7a32655019c21c21676e34 by @dependabot in #1314
  • Bump actions/create-github-app-token from 3.0.0 to 3.2.0 by @dependabot in #1316
  • Bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot in #1313
  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.26.2 to 2.26.6 by @dependabot in #1317
  • Bump getsentry/craft from 2.26.2 to 2.26.6 by @dependabot in #1318
  • Bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 by @dependabot in #1315
  • Bump github.com/gofiber/fiber/v2 from 2.52.12 to 2.52.13 in /fiber by @dependabot in #1300
  • Bump github.com/gofiber/fiber/v2 from 2.52.12 to 2.52.13 in /crosstest by @dependabot in #1301
  • Bump getsentry/craft from 2.25.2 to 2.26.2 by @dependabot in #1293
  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.2 to 2.26.2 by @dependabot in #1294

Other

Don't miss a new sentry-go release

NewReleases is sending notifications on new releases.