You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should this lib use the get_current_scope , or should it be a transaction thing, and should we use get_isolation_scope?
I'm seeing the following logs:
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/asgi_correlation_id/extensions/sentry.py:27: in set_transaction_id
with configure_scope() as scope:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
callback = None
def configure_scope( # noqa: F811
callback=None, # type: Optional[Callable[[Scope], None]]
):
# type: (...) -> Optional[ContextManager[Scope]]
"""
Reconfigures the scope.
:param callback: If provided, call the callback with the current scope.
:returns: If no callback is provided, returns a context manager that returns the scope.
"""
> warnings.warn(
"sentry_sdk.configure_scope is deprecated and will be removed in the next major version. "
"Please consult our migration guide to learn how to migrate to the new API: "
"https://docs.sentry.io/platforms/python/migration/1.x-to-2.x#scope-configuring",
DeprecationWarning,
stacklevel=2,
)
E DeprecationWarning: sentry_sdk.configure_scope is deprecated and will be removed in the next major version. Please consult our migration guide to learn how to migrate to the new API: https://docs.sentry.io/platforms/python/migration/1.x-to-2.x#scope-configuring
The text was updated successfully, but these errors were encountered:
This description of an isolation scope seems to suggest that we should possibly use that
The isolation scope follows a single basic unit of your program, such as a single request-response cycle or one task in a task queue, and holds data pertaining to it. In most cases, the lifecycle of an isolation scope maps to the lifecycle of a transaction.
Would you be interested in creating a PR for fixing this? I guess we should do some form of version checking of the package to determine which API to use, to keep backwards compatibility.
Hi,
Looks like the sentry_sdk is deprecating the configure_scope used here: https://github.com/snok/asgi-correlation-id/blob/main/asgi_correlation_id/extensions/sentry.py#L27
https://docs.sentry.io/platforms/python/migration/1.x-to-2.x#scope-configuring
Should this lib use the
get_current_scope
, or should it be a transaction thing, and should we use get_isolation_scope?I'm seeing the following logs:
The text was updated successfully, but these errors were encountered: