Skip to content

feat: report CLI usage analytics to Argvio - #84

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 iamigrate'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.
  • Failures are classified (timeout, canceled, network, user, unknown) by x's default classifier.
  • 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.
  • Times each successful export by source connector (export.run), labelled from the fixed list of sources.
  • 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, [Connector] WordPress #27) don't exist yet, so they can't be checked there for now.

🤖 Generated with Claude Code

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