feat: add scope context API - #1371
Open
giortzisg wants to merge 1 commit into
Open
Conversation
giortzisg
marked this pull request as ready for review
July 23, 2026 08:26
giortzisg
force-pushed
the
scopes/scope-storage
branch
from
July 23, 2026 08:45
0bb8a70 to
8ce983c
Compare
giortzisg
force-pushed
the
scopes/scope-storage
branch
from
July 30, 2026 20:45
8ce983c to
3ce9717
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
| func WithScope(ctx context.Context, fn func(context.Context, *Scope)) { | ||
| ctx = WithIsolation(ctx) | ||
| fn(ctx, scopeFromContext(ctx)) | ||
| } |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 3ce9717. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Issues
context.Context#1367Changelog Entry Instructions
To add a custom changelog entry, uncomment the section above. Supports:
For more details: custom changelog entries
Reminders
feat:,fix:,ref:,meta:)