-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[FDC] feat: Add analytics for dataconnect deploy #9303
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
Adds a new analytics event, `dataconnect_deploy`, to track the outcomes of various steps within the `firebase deploy` command for Data Connect services. This includes tracking for: - Billing errors - Build errors and warnings - Service creation and deletion - Schema migration events - Connector updates - User choices in interactive prompts Also includes tracking for the --dry-run and --force flags.
Summary of ChangesHello @fredzqm, 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 integrates a new analytics event, 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. 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 analytics for the dataconnect deploy command. The changes introduce a DeployStats interface to collect metrics throughout the deployment process, which are then sent as a dataconnect_deploy event. The implementation looks good overall, but I've found a critical issue where the analytics data is lost before being sent, and a minor issue with how one of the metrics is calculated. I've also suggested a refactoring to improve type safety for the analytics flags.
|
/gemini review |
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 introduces analytics for dataconnect deploy by adding a new dataconnect_deploy event. The changes involve creating a DeployStats context to collect metrics throughout the deployment lifecycle (prepare, deploy, release) and sending them via a trackGA4 call. The implementation is solid, but I've identified a few areas for improvement: a critical debug console.log that needs to be removed, a potential regression in error handling, a fragile implementation detail in analytics key generation, and some dead code. Addressing these points will improve the robustness and cleanliness of the code.
|
@rosalyntan @joehan To get a better understanding of what customers are running into during deploy, I am adding some detailed metrics. Please take a look~ |
Adds a new analytics event,
dataconnect_deploy, to track the outcomes of various steps within thefirebase deploycommand for Data Connect services.This includes tracking for:
Also includes tracking for the --dry-run and --force flags.
As part of this. When
deployfails, we still emitproduct_deploywithresultof the failing phase. Previously, it only emitproduct_deploywhendeploysucceeds.Description
Scenarios Tested
Here are some example stats reported:
Sample Commands