Skip to content

feat!: remove SetExtra - #1274

Merged
giortzisg merged 5 commits into
masterfrom
ref/remove-non047-deprecations
Apr 20, 2026
Merged

giortzisg merged 5 commits into
masterfrom
ref/remove-non047-deprecations

Conversation

@giortzisg

Copy link
Copy Markdown
Collaborator

Description

This PR removes deprecated SetExtra and update the code to either SetTag or SetAttribute instead.

Issues

Changelog Entry Instructions

To add a custom changelog entry, uncomment the section above. Supports:

  • Single entry: just write text
  • Multiple entries: use bullet points
  • Nested bullets: indent 4+ spaces

For more details: custom changelog entries

Reminders

This changes the behavior of stripping the event when serialization fails and resending, with just sending a client report when serialization fails
@giortzisg
giortzisg requested a review from lcian April 20, 2026 12:53
@github-actions

github-actions Bot commented Apr 20, 2026 •

Copy link
Copy Markdown

Semver Impact of This PR

🔴 Major (breaking changes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


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

  • Improve ci by giortzisg in #1271
  • Add crosstest package by giortzisg in #1269
  • Add sentrytest package by giortzisg in #1267

🤖 This preview updates automatically when you update the PR.

Comment thread slog/converter_test.go Resolved

@lcian lcian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, finally!

Base automatically changed from feat/remove-event-stripping to master April 20, 2026 13:02
Comment thread slog/converter.go Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2d76cc3. Configure here.

Comment thread slog/converter.go Resolved
@giortzisg giortzisg changed the title feat!: deprecate SetExtra feat!: remove SetExtra Apr 20, 2026
@giortzisg
giortzisg merged commit edb9172 into master Apr 20, 2026
18 checks passed
@giortzisg
giortzisg deleted the ref/remove-non047-deprecations branch April 20, 2026 13:22
denniszag added a commit to denniszag/errors that referenced this pull request Apr 25, 2026
sentry-go v0.46.0 removed the Extra field from sentry.Event (see
getsentry/sentry-go#1274). ReportError merged its extraDetails map into
event.Extra, which now fails to compile against sentry-go >= v0.46.0.

Because report_api.go in the root errors package imports the report
sub-package, the typecheck failure blocks the entire module for every
downstream consumer -- not just callers of the Sentry reporting code.

Switches the per-key merge to event.Contexts, which is the documented
replacement. Each extra is stored under sentry.Context{"value": v} to
conform to the Context schema (map[string]interface{}).

Along the way:

- Adds the new Close() and FlushWithContext(ctx) methods required by the
  v0.46.0 sentry.Transport interface on the test-only interceptingTransport
  in report/report_test.go and fmttests/datadriven_test.go.
- In the fmttests printer, filters to only Contexts entries that carry
  our "value" sub-key, so Sentry's built-in default contexts
  (device/os/runtime/trace) emitted by sentry.NewEvent() do not leak into
  fixtures. Preserves the "== Extra" label -- net fixture diff is empty.
- Fixes a pre-existing non-constant-format-string call in
  fmttests/datadriven_test.go flagged by the stricter go vet in the Go
  toolchain now required by sentry-go v0.46.0.
- Bumps the go directive to 1.25.0 (drops the no-longer-needed toolchain
  line) because sentry-go v0.46.0 itself declares go 1.25.0.

Fixes cockroachdb#158
AndrewHart102 added a commit to scribd/go-sdk that referenced this pull request May 14, 2026
v0.46.0 removed Event.Extra (getsentry/sentry-go#1274). Migrate the
logrus hook to populate Event.Contexts under a "logrus" key, matching
the official migration path for arbitrary structured data on error
events. entry.Data fields now appear under a Logrus context section in
the Sentry UI instead of the legacy Additional Data section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pull Bot pushed a commit to danielabelski/vikunja that referenced this pull request Jun 30, 2026
Scope.SetExtra was removed in sentry-go v0.47.0 (deprecated earlier,
dropped in getsentry/sentry-go#1274). For error events the recommended
replacement is SetContext, so attach the request URL via SetContext
instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址