Releases: getsentry/sentry-go
Releases · getsentry/sentry-go
0.47.0
Breaking Changes 🛠
- Fix
transaction_infosource 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 deprecated
otel.NewSentrySpanProcessor. Users should now use thesentryotlp.NewTraceExporterinstead 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.NewLoggeror any supported integration. Also the EnableLogs flag changes to DisableLogs for a global override switch by @giortzisg in #1306 - Remove the
ContextifyFramesintegration. 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"), )
- Supports multiple integration paths depending on how your app opens database connections:
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
- (otel) Remove unused semconv helpers by @giortzisg in #1321
- Update bump-version script to also bump crosstest by @giortzisg in #1327
0.46.2
Bug Fixes 🐛
- Add attachments to new event path by @giortzisg in #1295
0.46.1
Bug Fixes 🐛
- Correctly capture request body for fasthttp and fiber by @giortzisg in #1284
- (http) Avoid async transport shutdown panics by @giortzisg in #1288
- (httpclient) Clone request before adding trace headers by @giortzisg in #1290
- (scope) Use scoped client for request PII by @giortzisg in #1289
- Safe concurrent access for span and scope by @giortzisg in #1285
0.46.0
Breaking Changes 🛠
- Remove SetExtra by @giortzisg in #1274
- Update compatibility policy to align with Go, supporting only the last two major Go versions by @giortzisg in #1264
- Drop support for Go 1.24 by @giortzisg in #1264
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
DisableTelemetryBufferflag by @giortzisg in #1254 - Simplify client DSN storage to
internal/protocol.Dsnand 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
- Improve ci by @giortzisg in #1271
- Add crosstest package by @giortzisg in #1269
- Add sentrytest package by @giortzisg in #1267
0.45.1
Bug Fixes 🐛
- Add missing TracesSampler fields for SamplingContext by @giortzisg in #1259
0.45.0
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.NewTraceExporterinstead:
// 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 🐛
- (ci) Update validate-pr action to remove draft enforcement by @stephanie-anderson in #1237
- (fiber) Use UserContext for transaction to enable OTel trace linking by @giortzisg in #1252
- Race condition when getting envelope identifier by @giortzisg in #1250
Internal Changes 🔧
Deps
- Bump OpenTelemetry SDK to 1.40.0 by @giortzisg in #1243
- Bump changelog-preview.yml from 2.24.1 to 2.25.2 by @dependabot in #1247
- Bump getsentry/craft from 2.24.1 to 2.25.2 by @dependabot in #1248
- Bump codecov/codecov-action from 5.5.2 to 6.0.0 by @dependabot in #1245
- Bump actions/create-github-app-token from 2.2.1 to 3.0.0 by @dependabot in #1246
- Bump actions/setup-go from 6.3.0 to 6.4.0 by @dependabot in #1244
Other
- Update validate-pr workflow by @stephanie-anderson in #1242
- Add PR validation workflow by @stephanie-anderson in #1234
0.44.1
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, andScope.RemoveExtrain favor ofScope.SetAttributesandScope.RemoveAttributeby @giortzisg in #1224- The recommended migration path is to use
SetAttributesto attach values to logs and metrics. Note that attributes do not appear on error events; if you only capture errors, useSetTagorSetContextinstead. - 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), )
- The recommended migration path is to use
- 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
- Add AGENTS.md and testing guidelines by @giortzisg in #1216
- Add dotagents configuration by @giortzisg in #1211
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
- Pin GitHub Actions to full-length commit SHAs by @joshuarli in #1230
- Bump getsentry/craft to 2.24.1 by @giortzisg in #1225
- Handle independent go module versions for integrations by @giortzisg in #1217
0.44.0
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, andScope.RemoveExtrain favor ofScope.SetAttributesandScope.RemoveAttributeby @giortzisg in #1224- The recommended migration path is to use
SetAttributesto attach values to logs and metrics. Note that attributes do not appear on error events; if you only capture errors, useSetTagorSetContextinstead. - 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), )
- The recommended migration path is to use
- 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
- Add AGENTS.md and testing guidelines by @giortzisg in #1216
- Add dotagents configuration by @giortzisg in #1211
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
- Pin GitHub Actions to full-length commit SHAs by @joshuarli in #1230
- Bump getsentry/craft to 2.24.1 by @giortzisg in #1225
- Handle independent go module versions for integrations by @giortzisg in #1217
0.43.0
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 ✨
- Add zap logging integration by @giortzisg in #1184
- Log specific message for RequestEntityTooLarge by @giortzisg in #1185
Bug Fixes 🐛
- Improve otel span map cleanup performance by @giortzisg in #1200
- Ensure correct signal delivery on multi-client setups by @giortzisg in #1190
Internal Changes 🔧
Deps
- Bump golang.org/x/crypto to 0.48.0 by @giortzisg in #1196
- Use go1.24.0 by @giortzisg in #1195
- Bump github.com/gofiber/fiber/v2 from 2.52.9 to 2.52.11 in /fiber by @dependabot in #1191
- Bump getsentry/craft from 2.19.0 to 2.20.1 by @dependabot in #1187
Other
- Add omitzero and remove custom serialization by @giortzisg in #1197
- Rename Telemetry Processor components by @giortzisg in #1186
0.42.0
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
- (repo) Add Claude Code settings with basic permissions by @philipphofmann in #1175
- Update release and changelog-preview workflows by @giortzisg in #1177
- Bump echo to 4.10.1 by @giortzisg in #1174