Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: add telemetry wrapper for cli commands #333

Merged
merged 2 commits into from
Apr 22, 2024
Merged

Conversation

davidweisse
Copy link
Contributor

This adds a wrapper function around the generate, set and verify commands to send telemetry to the telemetry server. The processed data currently includes:

  • CLI version
  • The executed command
  • GOOS
  • GOARCH
  • An error string

The error string currently returns "unknown error" for a non-nil error. This can be configured by checking for error types in the future.

@davidweisse davidweisse requested a review from katexochen as a code owner April 16, 2024 09:10
@davidweisse davidweisse added the feature Shiny new feature for our users label Apr 16, 2024
@davidweisse davidweisse requested a review from thomasten April 16, 2024 10:01
Copy link
Member

@thomasten thomasten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, mostly looks good. Some nits and one minor UX issue.

cli/cmd/common.go Outdated Show resolved Hide resolved
cli/cmd/common.go Outdated Show resolved Hide resolved
cli/telemetry/errors.go Outdated Show resolved Hide resolved
cli/telemetry/telemetry.go Outdated Show resolved Hide resolved
cli/telemetry/telemetry.go Outdated Show resolved Hide resolved
cli/telemetry/telemetry_test.go Outdated Show resolved Hide resolved
@davidweisse davidweisse force-pushed the feat/telemetry-cli branch 3 times, most recently from 78787bb to 2e52688 Compare April 19, 2024 11:06
@thomasten
Copy link
Member

you can use DO_NOT_TRACK instead of hosts file

@davidweisse davidweisse force-pushed the feat/telemetry-cli branch 6 times, most recently from 150d097 to 20baf20 Compare April 19, 2024 13:50
Copy link
Member

@katexochen katexochen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! 🐳

@davidweisse davidweisse merged commit bc10283 into main Apr 22, 2024
8 checks passed
@davidweisse davidweisse deleted the feat/telemetry-cli branch April 22, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Shiny new feature for our users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants