Replace hubs with scopes#2157
Conversation
| } | ||
|
|
||
| return $this->hub->captureEvent($event); | ||
| return EventRecorder::captureEvent($event, null, $this->scope); |
There was a problem hiding this comment.
Transaction finish ignores forked scope
High Severity
finish() always captures through the IsolationScope stored at construction time. Previously, Hub-based capture used the hub’s current scope, so tags and processors added inside withScope() / withIsolationScope() after startTransaction() were applied. That data is now dropped unless the transaction was started inside the forked scope.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 79b8b52. Configure here.
There was a problem hiding this comment.
I'm not sure about this one. The described behaviour would only be relevant if finish is called while withIsolationScope is active, which is not the common case I think. I have to give this more thought and revisit it later
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 744dc13. Configure here.


Introduces the new Scopes concept in favour of the old Hub/Scope. This is the result of different PRs in a stack and should act as a final check to see the full picture