♻️ Simplify PostHog telemetry configuration - #91
Conversation
Co-authored-by: Codex Agent <codex@openai.com>
|
Ready to review this PR? Stage has broken it down into 3 individual chapters for you:
Chapters generated by Stage for commit 18946c2 on Jul 30, 2026 2:54pm UTC. |
📦 No plugin release on mergeThe plugin package, tag, and GitHub Release already exist for |
| const POSTHOG_PROJECT_TOKEN = | ||
| process.env.POSTHOG_PROJECT_TOKEN || | ||
| process.env.POSTHOG_API_KEY || | ||
| BUILT_IN_POSTHOG_PROJECT_TOKEN; | ||
| process.env.POSTHOG_PROJECT_TOKEN || BUILT_IN_POSTHOG_PROJECT_TOKEN; |
There was a problem hiding this comment.
Legacy token documentation is stale
The token selection no longer reads POSTHOG_API_KEY, but the telemetry configuration references still document it as a supported fallback. Maintainers following those references will configure a key that leaves telemetry disabled, so the affected almanac pages should be updated alongside this change.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Removes the legacy
POSTHOG_API_KEYfallback so runtime telemetry acceptsPOSTHOG_PROJECT_TOKENor the release-embedded project token.Keeps built-in host values empty unless a release explicitly configures
POSTHOG_HOST, while preserving the US endpoint as the runtime default.Adds Rudder-tagged integration coverage for supported tokens, rejected legacy keys, and release host generation.
Validation:
npm run check:agent-layout,npm run typecheck,npm test(30 passing), andnpm run build.Greptile Summary
Simplifies PostHog telemetry configuration.
POSTHOG_API_KEYruntime fallback.Confidence Score: 4/5
The PR appears safe to merge, with only non-blocking telemetry documentation drift to address.
Runtime and release behavior are consistently covered, but two repository configuration references still instruct maintainers to use the removed POSTHOG_API_KEY fallback.
Files Needing Attention: src/telemetry.ts and the telemetry almanac references
Important Files Changed
Reviews (1): Last reviewed commit: "♻️ Simplify PostHog telemetry configurat..." | Re-trigger Greptile