diff --git a/sentryio/core.py b/sentryio/core.py index 26f082a..43edff6 100644 --- a/sentryio/core.py +++ b/sentryio/core.py @@ -59,7 +59,7 @@ def init_sentry(self, dsn: str) -> None: ) def close_sentry(self) -> None: - client = sentry_sdk.Hub.current.client + client = sentry_sdk.get_client() if client is not None: log.info("Closing Sentry client") client.close(timeout=0) @@ -75,7 +75,7 @@ async def sentry_group(self, ctx): @sentry_group.command(name="status") async def status(self, ctx): """Check the status of Sentry.IO integration.""" - client = sentry_sdk.Hub.current.client + client = sentry_sdk.get_client() if client is None: await ctx.send("Sentry.IO is not initialized.") return