fix(telemetry): guard PostHog init failures

This commit is contained in:
YeonGyu-Kim
2026-04-14 02:50:46 +09:00
parent 3419bbc4a5
commit b525055590
2 changed files with 68 additions and 5 deletions
+11 -5
View File
@@ -87,11 +87,17 @@ function createPostHogClient(
return NO_OP_POSTHOG
}
const configuredClient = new PostHog(getPostHogApiKey(), {
...options,
host: getPostHogHost(),
disableGeoip: false,
})
let configuredClient: PostHog
try {
configuredClient = new PostHog(getPostHogApiKey(), {
...options,
host: getPostHogHost(),
disableGeoip: false,
})
} catch {
return NO_OP_POSTHOG
}
const sharedProperties = getSharedProperties(source)
return {