mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-08-24 07:03:32 +00:00
Fix sentry message with unsupported (#1890)
* Fix sentry message with unsupported * filter breadcrumb * Support add-on errors * Fix level * Add logging info
This commit is contained in:
@ -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,
|
||||
)
|
||||
|
Reference in New Issue
Block a user