chore(cli): set $ip: null on telemetry events to discard IP data

PostHog's $ip: null property tells the server to not associate the
request IP with the event. Combined with the "Discard client IP data"
project setting for server-side enforcement.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
James
2026-03-25 23:06:57 +00:00
co-authored by Claude Opus 4.6
parent c6e124392d
commit dd586f4705
+2 -2
View File
@@ -91,7 +91,7 @@ export async function flush(): Promise<void> {
const config = readConfig();
const batch = eventQueue.map((e) => ({
event: e.event,
properties: e.properties,
properties: { ...e.properties, $ip: null },
distinct_id: config.anonymousId,
timestamp: e.timestamp,
}));
@@ -127,7 +127,7 @@ export function flushSync(): void {
const config = readConfig();
const batch = eventQueue.map((e) => ({
event: e.event,
properties: e.properties,
properties: { ...e.properties, $ip: null },
distinct_id: config.anonymousId,
timestamp: e.timestamp,
}));