feat(telemetry): enable posthog geoip enrichment

This commit is contained in:
Andrey Avtomonov 2026-05-22 17:13:19 +02:00
parent 945ab263ac
commit 6ead25aa85
3 changed files with 3 additions and 6 deletions

View file

@ -15,7 +15,6 @@ type PostHogClient = {
event: string;
properties: Record<string, unknown>;
groups?: Record<string, string>;
disableGeoip?: boolean;
}): void;
groupIdentify(event: { groupType: string; groupKey: string; distinctId?: string }): void;
shutdown(): Promise<void> | void;
@ -47,7 +46,7 @@ async function getPostHogClient(projectApiKey: string, host: string): Promise<Po
}
clientPromise ??= import('posthog-node')
.then(({ PostHog }) => new PostHog(projectApiKey, { host, flushAt: 1, flushInterval: 0, disableGeoip: true }))
.then(({ PostHog }) => new PostHog(projectApiKey, { host, flushAt: 1, flushInterval: 0 }))
.catch(() => null);
return await clientPromise;
@ -146,7 +145,6 @@ export async function trackTelemetryEvent(input: {
event: input.event.name,
properties: input.event.properties,
groups: input.projectId ? { project: input.projectId } : undefined,
disableGeoip: true,
});
} catch {
return;