sentry: migrate off removed SetExtras API and bump sentry-go to v0.47.0#4549
sentry: migrate off removed SetExtras API and bump sentry-go to v0.47.0#4549twmb wants to merge 2 commits into
Conversation
sentry-go v0.47.0 removes the deprecated Scope.SetExtras method and the Event.Extra field (the "extra"/Additional Data concept) in favour of the attribute API. Attributes only apply to logs, not to the error/message events captured by this processor, so they are not a drop-in replacement. Building Redpanda Connect from source against a current Go module graph therefore picks up the removal and fails to compile on Scope.SetExtras. Attach the configured extras to the captured event as a context named "extras" instead. This preserves all extras data (sentry.Context is a map[string]any alias, so arbitrary values are retained) at the cost of a user-visible relocation: the data now surfaces under the event's Contexts section in Sentry rather than the legacy Additional Data section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Commits Review LGTM |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Commits Review LGTM |
What
Migrate the
sentry_captureprocessor off theScope.SetExtrasAPI (removed ingetsentry/sentry-gov0.47.0) and bump the dependency from v0.44.1 to v0.47.0.Why
sentry-go v0.47.0 removes the deprecated
Scope.SetExtrasmethod and theEvent.Extrafield entirely. Building Redpanda Connect from source against a current Go module graph picks up the removal and fails to compile.The obvious
Scope.SetAttributesreplacement is not a drop-in: attributes only apply to the structured-logging API, never to the error/message events this processor captures (ApplyToEventignores them), so using it would silently drop the extras data.How
Attach the configured extras to the captured event as a context named
extras(viaScope.SetContext).sentry.Contextis amap[string]anyalias, so arbitrary extras values are preserved with no type loss.The extras data now surfaces under the event's Contexts section in Sentry rather than the legacy Additional Data section. All data is preserved — only its location in the Sentry UI (and the event payload shape) changes. Saved searches or alerts that query the
extra.*path may need updating.🤖 Generated with Claude Code