🐛 Swallow telemetry error and only log in warn and debug mode (#2858)

* catch nodegraph errors

* use loglevel config for telemetry

* Use getByNameAndVersion instead of getByName

* remove any usage of nodeTypes.getByName method

* deprecate getByName method
This commit is contained in:
Ahsan Virani
2022-02-24 17:15:30 +01:00
committed by GitHub
parent 2b9f3aab1b
commit 8fc1095d1e
8 changed files with 58 additions and 74 deletions

View File

@@ -58,6 +58,7 @@ export class Telemetry {
this.versionCli = versionCli;
const enabled = config.get('diagnostics.enabled') as boolean;
const logLevel = config.get('logs.level') as boolean;
if (enabled) {
const conf = config.get('diagnostics.config.backend') as string;
const [key, url] = conf.split(';');
@@ -69,7 +70,7 @@ export class Telemetry {
return;
}
this.client = new TelemetryClient(key, url);
this.client = new TelemetryClient(key, url, { logLevel });
this.pulseIntervalReference = setInterval(async () => {
void this.pulse();