Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document use_isolation_scope in migration guide #10499

Open
szokeasaurusrex opened this issue Jun 26, 2024 · 0 comments · May be fixed by #10521
Open

Document use_isolation_scope in migration guide #10499

szokeasaurusrex opened this issue Jun 26, 2024 · 0 comments · May be fixed by #10521
Assignees

Comments

@szokeasaurusrex
Copy link
Member

Our migration guide provides instructions for how to replace manual hub clones with the new isolation_scope context manager. However, we do not provide any instructions for how to replace any more general with hub context manager.

Since sentry_sdk.Scope is no longer a context manager, with hub cannot be replaced simply with with isolation_scope. Instead, users now need to use use_isolation_scope, e.g. like so:

with use_isolation_scope(my_isolation_scope):
    ...

We should mention use_isolation_scope in the migration guide.

@szokeasaurusrex szokeasaurusrex self-assigned this Jun 26, 2024
szokeasaurusrex added a commit that referenced this issue Jun 27, 2024
Add documentation to inform users that custom `Hub` usage (i.e. `with my_hub` statements) should be replaced with the `sentry_sdk.use_isolation_scope` context manager.

Resolves #10499
@szokeasaurusrex szokeasaurusrex linked a pull request Jun 27, 2024 that will close this issue
6 tasks
szokeasaurusrex added a commit that referenced this issue Jun 27, 2024
Add documentation to inform users that custom `Hub` usage (i.e. `with my_hub` statements) should be replaced with the `sentry_sdk.use_isolation_scope` context manager.

Resolves #10499
szokeasaurusrex added a commit that referenced this issue Jun 27, 2024
Add documentation to inform users that custom `Hub` usage (i.e. `with my_hub` statements) should be replaced with the `sentry_sdk.use_isolation_scope` context manager.

Resolves #10499
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 a pull request may close this issue.

1 participant