Send accepted/removed lines with ACCEPT_FILE telemetry.#19670
Send accepted/removed lines with ACCEPT_FILE telemetry.#19670mattKorwel merged 2 commits intomainfrom
Conversation
Summary of ChangesHello @gundermanc, 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 introduces more granular telemetry data for accepted file edits. By capturing the exact number of lines added and removed by the model, we can gain a clearer understanding of how code assistance features are impacting user workflows and the codebase. This enhancement improves the quality of collected metrics without altering the core functionality of the code assistance tools. Highlights
Changelog
Activity
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
The pull request successfully adds acceptedLines and removedLines to the ACCEPT_FILE telemetry, which is a valuable improvement for tracking the impact of AI-generated edits. However, there are two significant issues that need to be addressed, both related to ensuring the accuracy and completeness of telemetry data as per established guidelines: a regression in the telemetry logic that filters out non-edit tool calls, and a mismatch in the tests where an unsupported property is expected. I have provided feedback and suggestions to resolve these issues, emphasizing the importance of semantically accurate telemetry keys.
| return traceId && isEdit && acceptedToolCalls / toolCalls.length >= 1 | ||
| ? createConversationInteraction( | ||
| traceId, | ||
| actionStatus || ActionStatus.ACTION_STATUS_NO_ERROR, | ||
| isEdit | ||
| ? ConversationInteractionInteraction.ACCEPT_FILE | ||
| : ConversationInteractionInteraction.UNKNOWN, | ||
| ConversationInteractionInteraction.ACCEPT_FILE, | ||
| String(acceptedLines), | ||
| String(removedLines), | ||
| ) | ||
| : undefined; |
There was a problem hiding this comment.
The addition of isEdit to the return condition causes the function to return undefined for non-edit tool calls (e.g., read_file), which were previously recorded as UNKNOWN. This change contradicts the comment on line 115 ("Treat file edits as ACCEPT_FILE and everything else as unknown") and results in a loss of telemetry coverage for general tool interactions. The suggested change restores the previous behavior while maintaining the new line count functionality for edits.
return traceId && acceptedToolCalls / toolCalls.length >= 1
? createConversationInteraction(
traceId,
actionStatus || ActionStatus.ACTION_STATUS_NO_ERROR,
isEdit
? ConversationInteractionInteraction.ACCEPT_FILE
: ConversationInteractionInteraction.UNKNOWN,
isEdit ? String(acceptedLines) : undefined,
isEdit ? String(removedLines) : undefined,
)
: undefined;References
- When logging events, ensure that the keys used for telemetry data accurately reflect the semantic meaning of the data being logged to avoid misinterpretation. Introduce new, more specific keys when existing ones are semantically confusing in a given context.
|
Size Change: +586 B (0%) Total Size: 25.2 MB ℹ️ View Unchanged
|
fdcbb8e to
b216891
Compare
dbffc01 to
16eba0c
Compare
Summary
Updates the Code Assist telemetry to send the number of lines accepted or removed with each edit.
How to Validate
Login with a Google account and then ask Gemini CLI to make a change to a file.
Pre-Merge Checklist