fix sentry

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

View File

@ -292,10 +292,7 @@ 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(
"supervisor",
{
"machine": coresys.machine, "machine": coresys.machine,
"arch": coresys.arch.default, "arch": coresys.arch.default,
"docker": coresys.docker.info.version, "docker": coresys.docker.info.version,
@ -309,12 +306,10 @@ def setup_diagnostics(coresys: CoreSys) -> None:
"dns": coresys.plugins.dns.version, "dns": coresys.plugins.dns.version,
"multicast": coresys.plugins.multicast.version, "multicast": coresys.plugins.multicast.version,
"cli": coresys.plugins.cli.version, "cli": coresys.plugins.cli.version,
}, }
) event["tags"][
scope.set_tag( "installation_type"
"installation_type", ] = f"{'os' if coresys.hassos.available else 'supervised'}"
f"{'os' if coresys.hassos.available else 'supervised'}",
)
return event return event