mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
feat(telemetry): enable PostHog GeoIP enrichment (#243)
Set disableGeoip: false on the CLI telemetry client so events are enriched with approximate, IP-based location at ingest. Update the first-run notice, public telemetry docs, and the AGENTS telemetry policy to drop the prior "anonymous" wording to match.
This commit is contained in:
parent
2e5f7f25aa
commit
95a265323a
4 changed files with 5 additions and 5 deletions
|
|
@ -278,7 +278,7 @@ use `PascalCase` without the suffix.
|
||||||
|
|
||||||
## Telemetry
|
## Telemetry
|
||||||
|
|
||||||
**ktx** ships anonymous PostHog telemetry. When adding commands or events:
|
**ktx** ships PostHog usage telemetry. When adding commands or events:
|
||||||
|
|
||||||
- **MUST NOT**: Add fields that carry user data — file paths, hostnames,
|
- **MUST NOT**: Add fields that carry user data — file paths, hostnames,
|
||||||
environment values, SQL text, schema/table/column names, error messages,
|
environment values, SQL text, schema/table/column names, error messages,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
title: Telemetry
|
title: Telemetry
|
||||||
description: Understand what anonymous usage telemetry ktx collects and how to opt out.
|
description: Understand what usage telemetry ktx collects and how to opt out.
|
||||||
---
|
---
|
||||||
|
|
||||||
**ktx** collects anonymous, aggregated usage telemetry so maintainers can see
|
**ktx** collects aggregated usage telemetry so maintainers can see
|
||||||
which commands work, where setup fails, and which parts of the data-agent
|
which commands work, where setup fails, and which parts of the data-agent
|
||||||
workflow need improvement. Telemetry is opt-out: it turns on the first time you
|
workflow need improvement. Telemetry is opt-out: it turns on the first time you
|
||||||
run **ktx** in an interactive terminal, which prints a one-time notice. From
|
run **ktx** in an interactive terminal, which prints a one-time notice. From
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ async function getPostHogClient(projectApiKey: string, host: string): Promise<Po
|
||||||
}
|
}
|
||||||
|
|
||||||
clientPromise ??= import('posthog-node')
|
clientPromise ??= import('posthog-node')
|
||||||
.then(({ PostHog }) => new PostHog(projectApiKey, { host, flushAt: 1, flushInterval: 0 }))
|
.then(({ PostHog }) => new PostHog(projectApiKey, { host, flushAt: 1, flushInterval: 0, disableGeoip: false }))
|
||||||
.catch(() => null);
|
.catch(() => null);
|
||||||
|
|
||||||
return await clientPromise;
|
return await clientPromise;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { z } from 'zod';
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export const TELEMETRY_NOTICE =
|
export const TELEMETRY_NOTICE =
|
||||||
'ktx collects anonymous usage data to improve the product. Opt out: set KTX_TELEMETRY_DISABLED=1.';
|
'ktx collects usage data to improve the product. Opt out: set KTX_TELEMETRY_DISABLED=1.';
|
||||||
|
|
||||||
const NOTICE_VERSION = 1;
|
const NOTICE_VERSION = 1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue