-
Notifications
You must be signed in to change notification settings - Fork 64
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
Emit telemetry event for bundle init
#2037
base: main
Are you sure you want to change the base?
Conversation
5a44895
to
4726b0e
Compare
libs/telemetry/logger.go
Outdated
// Maximum additional time to wait for the telemetry event to flush. We expect the flush | ||
// method to be called when the CLI command is about to exist, so this caps the maximum | ||
// additional time the user will experience because of us logging CLI telemetry. | ||
var MaxAdditionalWaitTime = 5 * time.Second |
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'll work on a followup PR to try and reduce the additional timeout we wait to capture telemetry requests.
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
If the contents of this PR has fanned out to other PRs, could you link which ones and close this one? |
Changes
This PR adds a telemetry event for the
bundle init
command, which is emitted on everybundle init
command invocation.This PR also adds a telemetry logger library that allows us to log arbitrary events as long as a corresponding proto exists in the universe.
We add a timeout of 3 seconds for logging the telemetry. Manual benchmarks show that that API requests can take anywhere from 1-3 seconds to finish. We start here with a pragmatic approach and can improve this it of the UX in either of two ways:
Tests
Integration/unit tests.
They ensure that we do not log PII.
Manually tested there are no (obvious) regressions in the UX and the telemetry event is being sent successfully: