From 5e9d0302971b80561808a7f0db582b93fb334045 Mon Sep 17 00:00:00 2001 From: yohlo Date: Tue, 25 Aug 2026 22:11:09 -0700 Subject: [PATCH] fix(telemetry): enable client tracking in dev --- src/lib/telemetry/client/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/telemetry/client/index.ts b/src/lib/telemetry/client/index.ts index 917beb1..eebcfc8 100644 --- a/src/lib/telemetry/client/index.ts +++ b/src/lib/telemetry/client/index.ts @@ -2,7 +2,8 @@ import type { AnyRouter } from "@tanstack/react-router"; // Provider-free by design: renders nothing and mounts no React context, so it // cannot disturb the LinguiProvider -> AuthProvider order. Browser-only; every -// entry point is a no-op during SSR and in dev unless VITE_TELEMETRY_DEV=1. +// entry point is a no-op during SSR. Runs in dev too - events go to the same +// PB the app is pointed at, which in dev is the local instance. type QueuedEvent = Record & { kind: "event" | "error" | "vital" }; @@ -19,9 +20,7 @@ let lastRouteId: string | undefined; let errorCount = 0; const recentErrors = new Map(); -const isEnabled = (): boolean => - typeof window !== "undefined" && - (import.meta.env.PROD || import.meta.env.VITE_TELEMETRY_DEV === "1"); +const isEnabled = (): boolean => typeof window !== "undefined"; const getSessionId = (): string => { try {