Repository navigation
feat(telemetryx): add durations, unknown commands, config count and auth state - #66
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66 +/- ##
==========================================
+ Coverage 89.21% 89.56% +0.34%
==========================================
Files 11 11
Lines 575 594 +19
==========================================
+ Hits 513 532 +19
Misses 62 62 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 1, 2026
Open
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
Follow-up to #61: exposes the features argvio-go v0.4.0 added, through
telemetryx.telemetryx.Execute(root)replacesroot.Execute()inmain. It records a mistyped command as an unknown-command attempt (nearest command as suggestion, never the typed text) and returns exactly the errorroot.Executewould, so output and exit code don't change. A mistyped subcommand of a parent with nothing to run is recorded byInstrumentalready.telemetryx.Duration(ctx, name, d, label)andtelemetryx.Timer(ctx, name, label)record vendor timings the command's own duration doesn't cover. Like counters they are accepted at the anonymous tier, so names and labels must be fixed identifiers (useVocabfor values read from input); the doc comment carries the warning.WithConfigCustomizedCountandWithAuthStateareInstrumentoptions that report how customized the config is and whether the user is signed in to the vendor's own service. Both are lazy, run once at session start and only when consent allows it, so they never read config or credentials for an opted-out user or in CI. Only a count or one of three states can be sent.Test plan
go build ./...,go vet ./...,go test ./...(also with-race),golangci-lint run --new-from-rev=origin/main(0 issues)CI,GITHUB_ACTIONS,DO_NOT_TRACKandARGVIO_DISABLEDset.--sqa-opt-out, or withDO_NOT_TRACK.The CLI PRs use these, so please merge this one first.
🤖 Generated with Claude Code