Conversation
0bb8a70 to
8ce983c
Compare
8ce983c to
3ce9717
Compare
| } | ||
|
|
||
| // WithScope is a shorthand for CurrentHub().WithScope. | ||
| func WithScope(f func(scope *Scope)) { |
There was a problem hiding this comment.
why are only these methods removed here and not the others? can you add a short summary of the breaking changes in the PR description?
There was a problem hiding this comment.
+1, please also adjust the PR title to feat! so that Craft identifies this as a breaking change
There was a problem hiding this comment.
Didn't remove the rest because of test usage. Functionality of the scope propagation on ctx isn't finalized on this PR so can't really swap, but it's a fair argument. I'll re-add this and remove everything with all Hub functionality on the final PR to only have public API breaking changes under a single part of the stack.
szokeasaurusrex
left a comment
There was a problem hiding this comment.
lgtm! Left a few minor comments and a question
| } | ||
|
|
||
| // WithScope is a shorthand for CurrentHub().WithScope. | ||
| func WithScope(f func(scope *Scope)) { |
There was a problem hiding this comment.
+1, please also adjust the PR title to feat! so that Craft identifies this as a breaking change
3ce9717 to
24cbd32
Compare
1ba25e1 to
5ebf737
Compare
5ebf737 to
14a0bf8
Compare
14a0bf8 to
01f70b4
Compare
01f70b4 to
a32c046
Compare
7c286e0 to
e747b11
Compare
e747b11 to
38e8186
Compare
38e8186 to
1b1b8fa
Compare
1b1b8fa to
098dc3a
Compare
098dc3a to
d43e721
Compare
d43e721 to
6cee5ee
Compare
6cee5ee to
fb20939
Compare
fb20939 to
2be08f1
Compare
2be08f1 to
772c96e
Compare
772c96e to
88702f8
Compare
Require context.Context across package capture APIs, bind clients and isolation scopes directly through context, and preserve last-event and propagation state on scopes. Keep Hub capture paths as a compatibility bridge while the stack migrates. Root isolation snapshots global enrichment without inheriting an unrelated transaction. Explicit context spans retain their transaction fallback, and clearing enrichment preserves request correlation. Package capture APIs now require context.Context and CaptureOption values. This replaces the old direct client capture signatures, RecoverWithContext, CapturePanic, EventFromMessage, EventFromException, EventFromCheckIn, and EventModifier APIs.
88702f8 to
b73b50f
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 b73b50f. Configure here.
| return event | ||
| processors := scope.eventProcessors[:len(scope.eventProcessors):len(scope.eventProcessors)] | ||
| scope.mu.RUnlock() | ||
| return processors |
There was a problem hiding this comment.
Scope lock leaked on apply panic
Medium Severity
applyToEvent now unlocks scope.mu by hand instead of with defer. A panic while copying scope data leaves that read lock held, so later captures on the same scope can hang. GlobalScope is process-wide, so a recovered panic during a background capture can stall all subsequent events.
Reviewed by Cursor Bugbot for commit b73b50f. Configure here.


Description
Adds the new scope context API.
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:)