-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(bigtable): add client startup time metrics. #13521
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
Conversation
Summary of ChangesHello @sushanb, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Bigtable Go client by adding client startup time metrics. It measures the duration from the initiation of client creation to the full initialization of the connection pool, providing valuable insights into the client's readiness performance. The implementation uses OpenTelemetry for metric collection, with a planned future enhancement to accurately determine and record the transport type. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request adds a new metric to track client startup time, which is a valuable addition for monitoring. The implementation is mostly correct, but I've identified a few areas for improvement regarding code clarity, robustness, and testing. My feedback includes fixing a typo in a variable name, improving the metric recording logic to be more robust, and enhancing the corresponding unit tests.
nimf
left a comment
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.
The only thing I don't like in this PR is adding the new clientCreationTimestamp argument to the NewBigtableChannelPool function. It already has 5 arguments. We don't really need this argument because we can get the time instant inside the NewBigtableChannelPool. But we "need" this to test the client startup metric, so I was thinking how can we do this in another way.
We provide the dial function as one of the arguments. What if for that test we add time.Sleep inside the dialFunc we create in the test? As our test runs with synctest the test won't acutally sleep but rather fast-forward time.
On the other hand this is internal API, so we can leave it as is and make this change later. Up to you.
i agree as the most time intensive part is in NewBigtableChannelPool. Semantically, we want to measure the time when customer intiialize NewClientWithConfig to when client ready so that;s why we add the clientCreationTimestamp |
TODO: on adding the transport type as we need to make Prime() rpc blocking.