-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat: telemetry for all commands #366
base: master
Are you sure you want to change the base?
Conversation
This change will make it so all commands run with `aptible-cli` will send a tuna event with the following info: - user email - user -or- org id - format (e.g. text or json) - command run - options provided to command This is the foundation for us to evaluate usage and provide us with the ability to make decisions about the future direction of the CLI. I tried to find a `before` hook for Thor but it looks like it doesn't exist: https://stackoverflow.com/questions/61855861/is-there-a-way-to-add-hooks-to-a-thor-class-in-order-to-run-code-before-after-al
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually work with httpclient
? I get SSL verification errors when i bundle exec
it from source, and i also just hacked this change into my toolbelt version, and get the same certificate verify failed
error, even though this is a valid let's encrypt certificate? We don't use LE certs for auth.aptible.com or api.aptible.com (the other endpoints the CLI talks to) so i don't know exactly what is to blame here:
![Screenshot 2025-01-30 at 15 24 52](https://private-user-images.githubusercontent.com/1580788/408326437-a2814b2f-06e8-4fa6-b601-e8985b5078a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTkwMDYsIm5iZiI6MTczODg5ODcwNiwicGF0aCI6Ii8xNTgwNzg4LzQwODMyNjQzNy1hMjgxNGIyZi0wNmU4LTRmYTYtYjYwMS1lODk4NWI1MDc4YTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDMyNTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTI0OGUzYTkxZmQyZjE3N2QxZGQ4YjA5MTljYTE4Y2MzNmRjYTgxNGI4N2M1M2EwNGQwMGYwOWU5MzQ4NDFlOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.0ZxZiAFfohg0pfNoz3jNMNTZM4yt90BCmfFGpc4EUKw)
You could bump the version in this PR if you don't want to open another one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will still have issues in our toolbelt, but the code looks fine.
This change will make it so all commands run with
aptible-cli
will send a tuna event with the following info:This is the foundation for us to evaluate usage and provide us with the ability to make decisions about the future direction of the CLI.
I tried to find a
before
hook for Thor but it looks like it doesn't exist: https://stackoverflow.com/questions/61855861/is-there-a-way-to-add-hooks-to-a-thor-class-in-order-to-run-code-before-after-al