Fix exp id logging#13430
Conversation
Summary of ChangesHello @owenofbrien, 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 addresses a critical issue where experiment IDs were not being correctly logged to Concord. The fix involves refactoring the telemetry logging mechanism to ensure experiment IDs are properly nested within the LogEvent.exp.gws_experiment field, as required. Additionally, a new metadata key has been introduced for experiment IDs, and the test suite has been updated to align with these changes, ensuring robust and accurate experiment data collection. 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.
Code Review
This pull request aims to fix experiment ID logging by moving the gws_experiment field. The changes are mostly correct, but I've identified a critical issue. When no experiments are active, a default experiment ID of 0 is logged, which could corrupt analytics data. This should be changed to an empty array. The other changes, such as updating tests and adding a new metadata key for experiment IDs, are appropriate.
|
Size Change: +1.5 kB (+0.01%) Total Size: 21.1 MB
ℹ️ View Unchanged
|
…vents were getting logged with empty exp ids because they were firing before the exp ids came back from the server. - Removed exp ids from gws_experiment field, as for some reason the data isn't flowing through to Concord this way.
Summary
Fix for broken exp id logging by logging to a new metadata field.
Details
Experiment ids are not flowing through to Concord as expected when logging to LogEvent.exp.gws_experiment (https://source.corp.google.com/piper///depot/google3/wireless/android/play/playlog/proto/clientanalytics.proto;l=235?q=symbol:LogRequest). I tried several approaches but ended up deciding to just log the data to a new metadata field (GEMINI_CLI_EXPERIMENT_IDS).
Related Issues
https://github.com/google-gemini/maintainers-gemini-cli/issues/1070
How to Validate
Pre-Merge Checklist