fix(telemetry): downgrade TS telemetry-failure logs to debug

Telemetry is best-effort by contract — every PostHog hiccup or
network blip would print red error lines on user stderr otherwise.
Python uses logger.debug for the same paths; this restores parity.

Keeps console.error only at sites that surface a real user-facing
failure (e.g., MemoryClient init ping failed).
This commit is contained in:
Mgeeeek
2026-05-06 01:55:47 +05:30
parent 64487cbf31
commit 4176293cc9
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -134,7 +134,7 @@ export default class MemoryClient {
captureClientEvent("init", this, {
client_type: "MemoryClient",
}).catch((error: any) => {
console.error("Failed to capture event:", error);
console.debug("Failed to capture event:", error);
});
} catch (error: any) {
console.error("Failed to initialize client:", error);
@@ -165,7 +165,7 @@ export default class MemoryClient {
}
}
} catch (error: any) {
console.error("Failed to alias telemetry identity:", error);
console.debug("Failed to alias telemetry identity:", error);
}
}
@@ -175,7 +175,7 @@ export default class MemoryClient {
args_count: args.length,
keys: args.length > 0 ? args[0] : [],
}).catch((error: any) => {
console.error("Failed to capture event:", error);
console.debug("Failed to capture event:", error);
});
}
+2 -2
View File
@@ -64,12 +64,12 @@ class UnifiedTelemetry implements TelemetryClient {
});
if (!response.ok) {
console.error("Telemetry event capture failed:", await response.text());
console.debug("Telemetry event capture failed:", response.status);
return false;
}
return true;
} catch (error) {
console.error("Telemetry event capture failed:", error);
console.debug("Telemetry event capture failed:", error);
return false;
}
}