From c7c6d20b9150655c2ceb7d4c3038a30bef3c49f9 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Wed, 2 Sep 2026 19:05:12 +0200 Subject: [PATCH] wip silence info log which are purely informational and log with std err and failure that mediapipe also raises as real js exceptions --- .../features/analytics/exceptionFilters.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/frontend/src/features/analytics/exceptionFilters.ts b/src/frontend/src/features/analytics/exceptionFilters.ts index aa97d502..5deb8a44 100644 --- a/src/frontend/src/features/analytics/exceptionFilters.ts +++ b/src/frontend/src/features/analytics/exceptionFilters.ts @@ -8,6 +8,28 @@ const IGNORED_EXCEPTION_PATTERNS = [ // the close reason is already logged by the SDK. // See: https://github.com/livekit/client-sdk-js/issues/2062 /^Event captured as exception with keys: isTrusted$/, + // MediaPipe's WASM writes its native logs to stderr, which Emscripten + // routes to console.error, which PostHog's console capture then promotes + // to an $exception — even though nothing was thrown. Two flavors: + // + // 1. "INFO: ..." lines are purely informational. In particular + // "INFO: Created TensorFlow Lite XNNPACK delegate for CPU." is a + // SUCCESS message: TFLite prints it when it lazily initializes CPU + // inference on the first segmented frame. It fires on every effects + // init, on every browser and delegate (the GPU delegate still + // instantiates the CPU/XNNPACK delegate for non-delegated ops), so it + // was our single noisiest "error" while carrying zero signal. + /^INFO: /, + // + // 2. absl-formatted log lines, e.g. + // "E0901 19:21:45.443000 1880752 gl_graph_runner_internal.cc:260] + // StartGraph failed: ..." + // (severity letter E/W/I/F + MMDD + timestamp). These are the stderr + // *copies* of failures that MediaPipe also raises as real JS + // exceptions, which we already capture via reportError / thrown + // errors. Dropping them de-duplicates each incident (previously + // counted 2-3x) without losing the actual error report. + /^[EWIF]\d{4} \d{2}:\d{2}:\d{2}\./, ] const shouldIgnoreException = (value: unknown): boolean =>