[Telemetry] Add support to collect the Blueprint name#5547
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 capabilities of the Cluster Toolkit by adding support for tracking blueprint names and deployment files. It introduces new helper functions to fetch and validate these details against the official repository, while also optimizing performance by caching GitHub API responses to minimize network overhead. 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 enhances telemetry collection by adding tracking for specific blueprint names and deployment files, categorizing them as either standard or 'Custom'. It introduces a caching mechanism for GitHub API responses to optimize network usage and refactors the telemetry collector to use lazy loading for standard module and file lists. Feedback focuses on addressing a potential nil pointer dereference in the new blueprint name fetching logic, implementing concurrency safety for global cache variables, and further optimizing HTTP requests through additional caching and partial JSON decoding.
|
/gemini summary |
|
/gemini review |
Summary of ChangesThis pull request refactors the telemetry collection process to improve performance and reliability. By implementing a local file-based caching mechanism and a concurrent worker pool for fetching metadata from GitHub, the toolkit now avoids redundant network calls and potential blocking issues. Additionally, it enhances telemetry by including the blueprint name, ensuring better visibility into cluster deployments while maintaining privacy through sanitization of custom module and blueprint paths. Highlights
Ignored Files
Activity
|
There was a problem hiding this comment.
Code Review
This pull request migrates metadata fetching from Firestore to the GitHub API, introducing local file-based caching for standard modules, examples, and blueprint names. Telemetry is updated to report the blueprint name, which is masked as "Custom" if unrecognized or "UNVERIFIED" if the fetch fails. Review feedback suggests improving the robustness of the implementation by handling errors during cache file operations, sorting fetched blueprint names to ensure deterministic results, and using isolated test servers instead of global HTTP transport mocks to prevent flaky tests.
98cbdf4
into
GoogleCloudPlatform:develop
This pull request enhances the toolkit's telemetry collection by collecting the name of the blueprint used for a deployment. To ensure user privacy, the telemetry collector validates blueprint names against a known list of official blueprints, anonymizing any proprietary or custom blueprint names.
Changes:
getBlueprintNamefunction which collects the blueprint name for a user blueprint to be able to track usage and popularity."Custom"."UNVERIFIED"to ensure it does not falsely imply a blueprint name was missing.KINDLY NOTE THAT TELEMETRY DATA IS NOT BEING COLLECTED YET.