Skip to content

feat: report CLI usage analytics to Argvio instead of OpenTelemetry - #45

Open
emmanuelgautier wants to merge 1 commit into
mainfrom
feat/argvio
Open

emmanuelgautier wants to merge 1 commit into
mainfrom
feat/argvio

Conversation

@emmanuelgautier

@emmanuelgautier emmanuelgautier commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Reports anonymous CLI usage analytics (command, flag names, exit code, latency) to cache-detective's own Argvio tenant through telemetryx.Instrument, and embeds its public_ingest ingest key. It only allows sending usage data, so it is safe to ship in the binary.
  • Removes the OpenTelemetry pipeline (telemetryx.New and the OTel reporter on scan). Argvio's command invocations and exit codes replace the per-command success and error counts.
  • Failures are classified (timeout, canceled, network, user, unknown) by x's default classifier. There were no OTel counters to carry over.
  • Records a mistyped command as an unknown-command attempt (nearest command as suggestion, never the typed text) through telemetryx.Execute. Shell, terminal and runtime on session start are sent by argvio itself at the Basic tier.
  • Uses telemetryx.Exit / telemetryx.Fatal instead of os.Exit / log.Fatal inside commands, so failed runs are recorded and flushed.
  • Opt out with --sqa-opt-out, DO_NOT_TRACK or ARGVIO_DISABLED. Interactive runs report at the Basic tier, CI runs at Anonymous. Counters are accepted at the anonymous tier, so they are also sent from CI; they only ever carry fixed identifiers written in code.

Dependency

Uses github.com/cerberauth/x at fc43052 on main (it includes #61 and #66, both merged) and argvio-go v0.4.0, both released. Nothing else needs to merge first.

Test plan

  • go build ./..., go vet ./..., go test ./..., golangci-lint run --new-from-rev=origin/main (0 issues)
  • Ran the built binary against the live endpoint, including failing commands; exit codes and output are unchanged.
  • Error reasons and counters are accepted by Argvio v0.5.0, but the dashboard panels for them (getargvio/ui#26, [S3] Cache-key explosion / cache-busting DoS check #27) don't exist yet, so they can't be checked there for now.

🤖 Generated with Claude Code

@emmanuelgautier emmanuelgautier changed the title feat: report CLI usage analytics to Argvio feat: report CLI usage analytics to Argvio instead of OpenTelemetry Oct 18, 2026
@emmanuelgautier
emmanuelgautier force-pushed the feat/argvio branch 3 times, most recently from a4d1a03 to f483bf4 Compare November 1, 2026 10:14
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.

1 participant