feat(telemetry): CLI usage telemetry - #410
Draft
djgould wants to merge 17 commits into
Draft
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…omes, disclosure wording Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: d07771f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CLERK_TELEMETRY_DISABLED=yes silently keeping telemetry on is the worst failure mode for a privacy control; only "0"/"false" now keep it enabled. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…check, --verbose payload dump The first human run only shows the notice (and says nothing was sent); finalize re-checks enablement against persisted config so `clerk telemetry disable` itself never emits an event; the full payload is visible with --verbose before the POST. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sisted opt-out status reports the winning reason (env var > clerk telemetry disable > dev-build guard); a run of `clerk telemetry disable` never sends an event. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…app ids honestly Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Adds usage telemetry to the CLI (GROW-1200): one
CLI_COMMAND_EXECUTEDevent per command run, sent toclerk-telemetry.com(BigQuery,sdk = 'clerk-cli').What an event contains
commandusers list— subcommand names only, never argumentsflagsjson,limit— flag names only, never valuesoutcome/exit_code/error_codeerror/1/not_linkedduration_ms412machine_uuidinstall_methodnpm_global,homebrew,npx, …ai_agentclaude_code,cursor,gemini_cli, … — empty for humansterminal_programghostty,warp, …modehuman/agent(TTY detection)os/arch/ci/in_tmux/in_screendarwin/arm64/false/ …envworkspace_id/app_idnullwhen unlinkedNever collected: command arguments, option values, file paths, error messages, or personal data.
Controls
clerk telemetry status|disable|enable— persisted opt-out; adisablerun sends nothing itselfCLERK_TELEMETRY_DISABLED/DO_NOT_TRACKenv vars (any non-false value)--verboseprints each event before the POST; failures never affect the command (1s cap)AIAgent/<agent>so API logs can classify agent trafficRelease gate: telemetry-service drops iid-less events (
workers/telemetry-service/src/index.ts:91) — needs the one-linesdk === "clerk-cli"exemption in cloudflare-workers before this ships, then an end-to-end BigQuery check.🤖 Generated with Claude Code