From a9d4b26c7fbbc6bddd9a45755738bf5db421b2b8 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Wed, 3 Sep 2025 15:16:19 +0200 Subject: [PATCH] feat: Turn the unraisable exception integration on by default --- sentry_sdk/integrations/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sentry_sdk/integrations/__init__.py b/sentry_sdk/integrations/__init__.py index 3a4804985a..f9db7905f0 100644 --- a/sentry_sdk/integrations/__init__.py +++ b/sentry_sdk/integrations/__init__.py @@ -1,6 +1,7 @@ from __future__ import annotations from abc import ABC, abstractmethod from threading import Lock +import sys from sentry_sdk.utils import logger @@ -74,6 +75,11 @@ def iter_default_integrations( "sentry_sdk.integrations.threading.ThreadingIntegration", ] +if sys.version_info >= (3, 8): + _DEFAULT_INTEGRATIONS.append( + "sentry_sdk.integrations.unraisablehook.UnraisablehookIntegration" + ) + _AUTO_ENABLING_INTEGRATIONS = [ "sentry_sdk.integrations.aiohttp.AioHttpIntegration", "sentry_sdk.integrations.anthropic.AnthropicIntegration",