mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 18:16:32 +00:00
parent
fb5d54d5fe
commit
f5dda39f63
@ -16,6 +16,7 @@ from .arch import CpuArch
|
|||||||
from .auth import Auth
|
from .auth import Auth
|
||||||
from .const import (
|
from .const import (
|
||||||
ENV_HOMEASSISTANT_REPOSITORY,
|
ENV_HOMEASSISTANT_REPOSITORY,
|
||||||
|
ENV_SUPERVISOR_DEV,
|
||||||
ENV_SUPERVISOR_MACHINE,
|
ENV_SUPERVISOR_MACHINE,
|
||||||
ENV_SUPERVISOR_NAME,
|
ENV_SUPERVISOR_NAME,
|
||||||
ENV_SUPERVISOR_SHARE,
|
ENV_SUPERVISOR_SHARE,
|
||||||
@ -169,7 +170,7 @@ def initialize_system_data(coresys: CoreSys) -> None:
|
|||||||
coresys.config.modify_log_level()
|
coresys.config.modify_log_level()
|
||||||
|
|
||||||
# Check if ENV is in development mode
|
# Check if ENV is in development mode
|
||||||
if bool(os.environ.get("SUPERVISOR_DEV", 0)):
|
if bool(os.environ.get(ENV_SUPERVISOR_DEV, 0)):
|
||||||
_LOGGER.warning("SUPERVISOR_DEV is set")
|
_LOGGER.warning("SUPERVISOR_DEV is set")
|
||||||
coresys.updater.channel = UpdateChannels.DEV
|
coresys.updater.channel = UpdateChannels.DEV
|
||||||
coresys.config.logging = LogLevel.DEBUG
|
coresys.config.logging = LogLevel.DEBUG
|
||||||
@ -280,11 +281,11 @@ def supervisor_debugger(coresys: CoreSys) -> None:
|
|||||||
|
|
||||||
def setup_diagnostics(coresys: CoreSys) -> None:
|
def setup_diagnostics(coresys: CoreSys) -> None:
|
||||||
"""Sentry diagnostic backend."""
|
"""Sentry diagnostic backend."""
|
||||||
_LOGGER.info("Initialize Supervisor Sentry")
|
dev_env: bool = bool(os.environ.get(ENV_SUPERVISOR_DEV, 0))
|
||||||
|
|
||||||
def filter_data(event, hint):
|
def filter_data(event, hint):
|
||||||
# Ignore issue if system is not supported or diagnostics is disabled
|
# Ignore issue if system is not supported or diagnostics is disabled
|
||||||
if not coresys.config.diagnostics or not coresys.supported:
|
if not coresys.config.diagnostics or not coresys.supported or dev_env:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Not full startup - missing information
|
# Not full startup - missing information
|
||||||
@ -325,6 +326,7 @@ def setup_diagnostics(coresys: CoreSys) -> None:
|
|||||||
level=logging.WARNING, event_level=logging.CRITICAL
|
level=logging.WARNING, event_level=logging.CRITICAL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_LOGGER.info("Initialize Supervisor Sentry")
|
||||||
sentry_sdk.init(
|
sentry_sdk.init(
|
||||||
dsn="https://9c6ea70f49234442b4746e447b24747e@o427061.ingest.sentry.io/5370612",
|
dsn="https://9c6ea70f49234442b4746e447b24747e@o427061.ingest.sentry.io/5370612",
|
||||||
before_send=filter_data,
|
before_send=filter_data,
|
||||||
|
@ -74,6 +74,7 @@ ENV_HOMEASSISTANT_REPOSITORY = "HOMEASSISTANT_REPOSITORY"
|
|||||||
ENV_SUPERVISOR_SHARE = "SUPERVISOR_SHARE"
|
ENV_SUPERVISOR_SHARE = "SUPERVISOR_SHARE"
|
||||||
ENV_SUPERVISOR_NAME = "SUPERVISOR_NAME"
|
ENV_SUPERVISOR_NAME = "SUPERVISOR_NAME"
|
||||||
ENV_SUPERVISOR_MACHINE = "SUPERVISOR_MACHINE"
|
ENV_SUPERVISOR_MACHINE = "SUPERVISOR_MACHINE"
|
||||||
|
ENV_SUPERVISOR_DEV = "SUPERVISOR_DEV"
|
||||||
|
|
||||||
REQUEST_FROM = "HASSIO_FROM"
|
REQUEST_FROM = "HASSIO_FROM"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user