Skip to content

fix(telemetry): stop tracking the completion command - #417

Merged
wyattjoh merged 2 commits into
mainfrom
devin/remove-completion-telemetry-ccf0cb
Aug 17, 2026
Merged

fix(telemetry): stop tracking the completion command#417
wyattjoh merged 2 commits into
mainfrom
devin/remove-completion-telemetry-ccf0cb

Conversation

@djgould

@djgould djgould commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

clerk completion <shell> is wired into shell rc files with eval, so it re-runs on every new shell instead of when a user asks for it. Its events measure shell startups, not CLI usage.

Last 14 days in clerk_telemetry.events (test machine excluded):

  • completion was the Bootstrap Clerk CLI with auth flow #1 command by volume: 19,436 of 55,994 events (34.7%) — ahead of api (25.9%)
  • from 9 machines, one of which (59a6b836…) sent 98.2% of them (12,356 in a single day)
  • it was 60.2% of all CLI events on Aug 14 and 46.8% on Aug 13; drop that one machine and completion is 0.6% of volume

Change: startCommandTelemetry skips completion, so no event and no first-run disclosure notice on a shell-startup run. __complete (each Tab press) already exits in cli.ts before Commander, so it never emitted events.

Telemetry integration tests used clerk completion zsh as their sample command; they now drive clerk webhooks token (also offline and auth-free).

Data

🤖 Generated with Claude Code

`clerk completion <shell>` is wired into shell rc files with `eval`, so it
re-runs on every new shell rather than when a user asks for it. It was 34.7%
of all CLI telemetry over the last 14 days (19,436 of 55,994 events), 98% of
it from a single machine, and 60% of one day's volume — enough to swing every
command-mix and volume chart.

`__complete` (fired on each Tab press) already exits in cli.ts before
Commander runs, so it never emitted events.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 943b47c

The changes in this PR will be included in the next version bump.

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

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


Comment @coderabbitai help to get the list of available commands.

- restore an argv-leak assertion on a *sent* event (the driver swap dropped
  the only one): the invalid --mode test now asserts "banana" never appears
- make the completion suppression test discriminate: it asserted zero
  requests on the first-run grace path, where nothing sends anyway, so it
  passed with the guard removed — it now also runs past the notice
- collapse the one-entry UNTRACKED_COMMANDS set to a direct comparison
- drive `webhooks token --json` in telemetry tests to skip outro's animation
- drop the unit test the integration test strictly covers
- note the completion exception in the module docstring

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wyattjoh
wyattjoh merged commit 93bec58 into main Aug 17, 2026
9 of 10 checks passed
@wyattjoh
wyattjoh deleted the devin/remove-completion-telemetry-ccf0cb branch August 17, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants