Skip to content

feat: add scope context API - #1371

Open
giortzisg wants to merge 1 commit into
scopes/scope-datafrom
scopes/scope-storage
Open

feat: add scope context API#1371
giortzisg wants to merge 1 commit into
scopes/scope-datafrom
scopes/scope-storage

Conversation

@giortzisg

@giortzisg giortzisg commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

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

@linear-code

linear-code Bot commented Jul 23, 2026

Copy link
Copy Markdown

GO-154

@giortzisg
giortzisg marked this pull request as ready for review July 23, 2026 08:26
Comment thread scope_context.go
Comment thread sentry.go
@giortzisg
giortzisg force-pushed the scopes/scope-storage branch from 0bb8a70 to 8ce983c Compare July 23, 2026 08:45
@giortzisg
giortzisg force-pushed the scopes/scope-storage branch from 8ce983c to 3ce9717 Compare July 30, 2026 20:45

@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 3ce9717. Configure here.

Comment thread scope_context.go
func WithScope(ctx context.Context, fn func(context.Context, *Scope)) {
ctx = WithIsolation(ctx)
fn(ctx, scopeFromContext(ctx))
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WithScope no longer enriches captures

High Severity

The new WithScope replaces the hub-based shorthand with a context isolation fork, but package-level CaptureException and related APIs still read only the hub scope. Temporary scope data set inside WithScope is therefore not applied to captured events, and existing sentry.WithScope(func(scope *Scope)) call sites no longer compile.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3ce9717. Configure here.

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.

1 participant