[Telemetry] Add support to collect GCP Project Number#5528
Conversation
Summary of ChangesHello, 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 telemetry collection mechanism by incorporating the Google Cloud Project Number into event metadata. It introduces the necessary API dependencies and refactors existing timeout configurations to ensure consistent behavior across the codebase. Highlights
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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds the ability to collect and include the GCP project number in telemetry events by integrating the Cloud Resource Manager API. It also refactors internal timeout constants and unexports several telemetry-related constants. A significant issue was identified in the new getProjectNumber function, where the error from NewProjectsClient is ignored; this could lead to a nil pointer dereference when attempting to close the client. Additionally, the implementation should verify the presence of a project ID before initializing the client to improve efficiency.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds project number retrieval to the telemetry system, introducing the getProjectNumber function, a ProjectsClientInterface for abstraction, and corresponding unit tests. It also refactors timeout constants and unexports internal configuration variables. Feedback focuses on improving code cleanliness by removing commented-out code and optimizing getProjectNumber to validate the project ID before resource initialization.
|
/gemini review |
|
/gemini summary |
There was a problem hiding this comment.
Code Review
This pull request integrates the Google Cloud Resource Manager API to include project numbers in telemetry events by adding a ProjectNumber field to the ConcordEvent struct and implementing the logic to fetch it from the blueprint. It also refactors telemetry constants and adds unit tests for the new functionality. Review feedback highlights a critical nil pointer dereference risk in the project fetching logic and suggests improving the test mocks to correctly validate error handling scenarios.
Summary of ChangesThis pull request enhances the telemetry collection mechanism by incorporating the Google Cloud Project Number into event metadata. It introduces the necessary API dependencies and refactors existing timeout configurations to ensure consistent behavior across the codebase. Highlights
Activity
|
8662442
into
GoogleCloudPlatform:develop
This pull request enhances the Cluster Toolkit Telemetry collection mechanism by incorporating the GCP Project Number into event metadata. It introduces the necessary API dependencies and refactors existing timeout configurations to ensure consistent behaviour across the codebase. Added unit tests with appropriate mocking for the new code.
Changes:
KINDLY NOTE THAT TELEMETRY DATA IS NOT BEING COLLECTED YET.