Repository navigation
feat(telemetryx): add Argvio usage analytics with error reasons, features and counters - #61
Merged
Merged
Conversation
This was referenced Oct 18, 2026
Open
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61 +/- ##
==========================================
+ Coverage 87.42% 89.21% +1.79%
==========================================
Files 8 11 +3
Lines 485 575 +90
==========================================
+ Hits 424 513 +89
- Misses 61 62 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Oct 19, 2026
emmanuelgautier
force-pushed
the
feat/telemetryx-argvio
branch
2 times, most recently
from
October 19, 2026 22:32
330f863 to
0f3a0ed
Compare
emmanuelgautier
force-pushed
the
feat/telemetryx-argvio
branch
2 times, most recently
from
October 28, 2026 23:59
c2c4efa to
94dae8e
Compare
…ures and counters
emmanuelgautier
force-pushed
the
feat/telemetryx-argvio
branch
from
October 29, 2026 00:10
94dae8e to
b46113e
Compare
3 tasks done
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
telemetryx.Instrument(root, version, apiKey, opts...), which wires argvio-go'scobrasdkinto a CLI's whole Cobra tree (command, flag names, exit code, latency, help usage, sessions). It sits alongsidetelemetryx.New, so the existing OTel metrics and traces are unchanged.apiKeyis each CLI's ownpublic_ingestArgvio key, so every CLI lands in its own Argvio tenant. Thetelemetry.cerberauth.comcollector forwards it as is.telemetryx.Exit/telemetryx.Fatalto use instead ofos.Exit/log.Fatalinside commands. Those skip the hooks that record a command's outcome and the deferred flush, so such runs were never reported.Fataland errors returned fromRunEare classified by a default classifier (timeout, canceled, network, missing or unreadable file and Cobra usage errors areuser; the restunknown).telemetryx.Reason(err, "no-token")andtelemetryx.Classified(err, category, reason)attach a fixed-vocabulary reason where a CLI knows the cause, andWithClassifierreplaces the default.telemetryx.Counter(ctx, name, n, label)adds to an Argvio counter andtelemetryx.Feature(ctx, name)records a capability as used.telemetryx.Vocab(value, allowed...)limits a value read from the CLI's input to a list written in code.--sqa-opt-out,DO_NOT_TRACKandARGVIO_DISABLEDdisable everything.Newnow honorsDO_NOT_TRACKtoo.argvio-gov0.3.0 or later (this branch uses v0.4.0).Test plan
go build ./...,go vet ./...,go test ./...,golangci-lint run --new-from-rev=origin/main(0 issues)feat/argviobranches.The CLI PRs depend on this one. Please merge it first.
🤖 Generated with Claude Code