diff --git a/supervisor/addons/__init__.py b/supervisor/addons/__init__.py index a3f84ede2..7c64dd48c 100644 --- a/supervisor/addons/__init__.py +++ b/supervisor/addons/__init__.py @@ -98,6 +98,7 @@ class AddonManager(CoreSysAttributes): await addon.start() except Exception as err: # pylint: disable=broad-except _LOGGER.warning("Can't start Add-on %s: %s", addon.slug, err) + self.sys_capture_exception(err) await asyncio.sleep(self.sys_config.wait_boot) @@ -121,6 +122,7 @@ class AddonManager(CoreSysAttributes): await addon.stop() except Exception as err: # pylint: disable=broad-except _LOGGER.warning("Can't stop Add-on %s: %s", addon.slug, err) + self.sys_capture_exception(err) async def install(self, slug: str) -> None: """Install an add-on.""" diff --git a/supervisor/bootstrap.py b/supervisor/bootstrap.py index 5c4a36641..4520c97b8 100644 --- a/supervisor/bootstrap.py +++ b/supervisor/bootstrap.py @@ -280,6 +280,7 @@ def supervisor_debugger(coresys: CoreSys) -> None: def setup_diagnostics(coresys: CoreSys) -> None: """Sentry diagnostic backend.""" + _LOGGER.info("Initialize Supervisor Sentry") def filter_data(event, hint): # Ignore issue if system is not supported or diagnostics is disabled @@ -319,12 +320,14 @@ def setup_diagnostics(coresys: CoreSys) -> None: # Set log level sentry_logging = LoggingIntegration( - level=logging.ERROR, event_level=logging.CRITICAL + level=logging.WARNING, event_level=logging.CRITICAL ) sentry_sdk.init( dsn="https://9c6ea70f49234442b4746e447b24747e@o427061.ingest.sentry.io/5370612", before_send=filter_data, + before_breadcrumb=filter_data, + max_breadcrumbs=20, integrations=[AioHttpIntegration(), sentry_logging], release=SUPERVISOR_VERSION, )