feat(core): add skill name dimension to tool call telemetry (#18189)#28474
feat(core): add skill name dimension to tool call telemetry (#18189)#28474dimpavloff wants to merge 3 commits into
Conversation
…emini#18189) Extract the skill name from `activate_skill` tool call arguments and include it as an optional `skill_name` dimension/label in `gemini_cli.tool.call.count` and `gemini_cli.tool.call.latency` metrics. - Update `TOOL_CALL_COUNT` and `TOOL_CALL_LATENCY` attribute schemas in `metrics.ts` - Modify `recordToolCallMetrics` to pass `skill_name` attribute to `toolCallLatencyHistogram` - Update `logToolCall` in `loggers.ts` to extract and supply the `skill_name` dimension - Add unit tests in `loggers.test.ts` to verify correct behavior Fixes google-gemini#18189
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 introduces a new 'skill_name' dimension to tool call telemetry. By extracting this information from 'activate_skill' tool calls, the system can now provide more granular insights into tool performance and usage patterns within the 'gemini_cli' metrics. 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 the 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 counterproductive. 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
|
|
📊 PR Size: size/M
|
There was a problem hiding this comment.
Code Review
This pull request adds support for tracking the skill_name attribute in telemetry metrics (both counters and latency histograms) when the activate_skill tool is called. It extracts the skill name from the tool arguments, updates the logging and metrics recording functions, and adds a unit test to verify this behavior. The reviewer suggests trimming the extracted skill_name string and ensuring it is not empty before recording it to prevent whitespace-only values from being logged.
- Trim whitespace from extracted skill name in logToolCall - Ensure empty/whitespace-only skill names are ignored - Update unit tests to verify trimming and empty value validation Related to google-gemini#18189
Summary
Add a
skill_namedimension to tool call telemetry.Details
Disclaimer: I am not familiar with the code base and this was entirely vibe coded.
Extract the skill name from
activate_skilltool call arguments and include it as an optionalskill_namedimension/label ingemini_cli.tool.call.countandgemini_cli.tool.call.latencymetrics.TOOL_CALL_COUNTandTOOL_CALL_LATENCYattribute schemas inmetrics.tsrecordToolCallMetricsto passskill_nameattribute totoolCallLatencyHistogramlogToolCallinloggers.tsto extract and supply theskill_namedimensionloggers.test.tsto verify correct behaviorRelated Issues
Fixes #18189
How to Validate
Pre-Merge Checklist