PostHog error observability across API, dashboard, and CLI#101
Open
distroinfinity wants to merge 15 commits into
Open
PostHog error observability across API, dashboard, and CLI#101distroinfinity wants to merge 15 commits into
distroinfinity wants to merge 15 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds PostHog error tracking + debugging across all three surfaces (errors-first; not product analytics). A dedicated Distro TV PostHog project is assumed (separate from the unrelated Dodge AI project). Every runtime path is a no-op until its key is set, so this is safe to merge before credentials land.
@distrotv/shared/telemetry): SDK-agnostic contract — event names,resolveRelease, env kill-switch, and a default-denyscrubString/scrubError(strips filesystem paths +gh*/sk-*/JWT tokens).posthog-node): captures the error-handler's unknown-error branch (not known 4xx) +unhandledRejection/uncaughtExceptioninindex.ts/worker.ts; bounded flush on SIGTERM. pino + Slack stay as local ground truth.posthog-js): exception autocapture + session replay with all inputs/text masked + aglobal-errorboundary. Keeps@vercel/analyticsfor pageviews.posthog-node): ingest key baked at build via tsupdefine. Daemon owns the long-lived client (captures faults +log.error, stays alive by design); interactive commands capture viareportErrorthen a bounded flush-on-exit. Hooks carry no telemetry — the <200ms slot-vanish budget is untouched (verified by the existinghook-timingsmoke test).DISTRO_TELEMETRY=0env →~/.distro/config.jsonflag → default.distro config telemetry on|off|status, a one-time notice afterdistro init, and adistro doctorprobe.distinct_id, release). Never sends prompts, code, file contents, ticker/news content, watchlist symbols, secrets, or paths. Web relies on replay masking + no PII identify (seegitbook-docs/engineering/observability.md).Still pending (needs your new PostHog project creds — not in this PR)
POSTHOG_KEY/POSTHOG_HOST(Railway),NEXT_PUBLIC_POSTHOG_*(Vercel), bakePOSTHOG_CLI_KEYin the release workflowPOSTHOG_CLI_TOKEN; deferred to avoid breaking CI)Test plan
pnpm typecheck/pnpm lint/pnpm build— all green across packageshook-timingsmoke (<100ms hot path)distro config telemetry on/off/status+DISTRO_TELEMETRY=0forced-off verified at runtimeDISTRO_TELEMETRY=0→ zero network)