Skip to content

Commit 483b433

Browse files
fix(web): Respect disable telemetry flag for web server side events (#657)
* fix * changelog
1 parent bcca1d6 commit 483b433

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Fixed issue where the disable telemetry flag was not being respected for web server telemetry. [#657](https://github.com/sourcebot-dev/sourcebot/pull/657)
12+
1013
## [4.10.1] - 2025-12-03
1114

1215
### Added

packages/web/src/lib/posthog.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ const getPostHogCookie = (cookieStore: Pick<RequestCookies, 'get'>): PostHogCook
4848
}
4949

5050
export async function captureEvent<E extends PosthogEvent>(event: E, properties: PosthogEventMap[E]) {
51+
if (env.SOURCEBOT_TELEMETRY_DISABLED === 'true') {
52+
return;
53+
}
54+
5155
const cookieStore = await cookies();
5256
const cookie = getPostHogCookie(cookieStore);
5357

0 commit comments

Comments
 (0)