sentry-docs icon indicating copy to clipboard operation
sentry-docs copied to clipboard

Document `use_isolation_scope` in migration guide

Open szokeasaurusrex opened this issue 1 year ago • 0 comments

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 avatar Jun 26 '24 10:06 szokeasaurusrex