From 39e61d9a771a9e449fc58200bb600bc7f43046ef Mon Sep 17 00:00:00 2001 From: bkellam Date: Thu, 4 Dec 2025 09:30:48 -0800 Subject: [PATCH 1/2] fix --- packages/web/src/lib/posthog.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/web/src/lib/posthog.ts b/packages/web/src/lib/posthog.ts index 916151ca..6296768e 100644 --- a/packages/web/src/lib/posthog.ts +++ b/packages/web/src/lib/posthog.ts @@ -48,6 +48,10 @@ const getPostHogCookie = (cookieStore: Pick): PostHogCook } export async function captureEvent(event: E, properties: PosthogEventMap[E]) { + if (env.SOURCEBOT_TELEMETRY_DISABLED === 'true') { + return; + } + const cookieStore = await cookies(); const cookie = getPostHogCookie(cookieStore); From d8f4cf6564792d4da82e52ac9cd6dba1f60438d8 Mon Sep 17 00:00:00 2001 From: bkellam Date: Thu, 4 Dec 2025 10:32:21 -0800 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f26ab10..316973f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Fixed issue where the disable telemetry flag was not being respected for web server telemetry. [#657](https://github.com/sourcebot-dev/sourcebot/pull/657) + ## [4.10.1] - 2025-12-03 ### Added