Skip to content

Replace hubs with scopes#2157

Open
Litarnus wants to merge 21 commits into
5.xfrom
replace-hubs-with-scopes
Open

Replace hubs with scopes#2157
Litarnus wants to merge 21 commits into
5.xfrom
replace-hubs-with-scopes

Conversation

@Litarnus

Copy link
Copy Markdown
Contributor

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

@Litarnus
Litarnus marked this pull request as ready for review July 16, 2026 16:19
Comment thread src/Tracing/PropagationContext.php
}

return $this->hub->captureEvent($event);
return EventRecorder::captureEvent($event, null, $this->scope);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 79b8b52. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Comment thread src/State/ScopeData.php Outdated
Comment thread src/State/EventRecorder.php
Comment thread src/State/EventRecorder.php
Comment thread src/Integration/AbstractErrorListenerIntegration.php

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

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

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

Comment thread src/SentrySdk.php
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