fix sentry

This commit is contained in:
Pascal Vizeli 2020-08-11 17:42:55 +00:00
parent e70c9d8a30
commit 1df35a6fe1

View File

@ -292,29 +292,24 @@ def setup_diagnostics(coresys: CoreSys) -> None:
return event return event
# Update information # Update information
with sentry_sdk.configure_scope() as scope: event["contexts"]["supervisor"] = {
scope.set_context( "machine": coresys.machine,
"supervisor", "arch": coresys.arch.default,
{ "docker": coresys.docker.info.version,
"machine": coresys.machine, "channel": coresys.updater.channel,
"arch": coresys.arch.default, "supervisor": coresys.supervisor.version,
"docker": coresys.docker.info.version, "os": coresys.hassos.version,
"channel": coresys.updater.channel, "host": coresys.host.info.operating_system,
"supervisor": coresys.supervisor.version, "kernel": coresys.host.info.kernel,
"os": coresys.hassos.version, "core": coresys.homeassistant.version,
"host": coresys.host.info.operating_system, "audio": coresys.plugins.audio.version,
"kernel": coresys.host.info.kernel, "dns": coresys.plugins.dns.version,
"core": coresys.homeassistant.version, "multicast": coresys.plugins.multicast.version,
"audio": coresys.plugins.audio.version, "cli": coresys.plugins.cli.version,
"dns": coresys.plugins.dns.version, }
"multicast": coresys.plugins.multicast.version, event["tags"][
"cli": coresys.plugins.cli.version, "installation_type"
}, ] = f"{'os' if coresys.hassos.available else 'supervised'}"
)
scope.set_tag(
"installation_type",
f"{'os' if coresys.hassos.available else 'supervised'}",
)
return event return event