Skip to content

feat(core): add skill name dimension to tool call telemetry (#18189)#28474

Open
dimpavloff wants to merge 3 commits into
google-gemini:mainfrom
dimpavloff:skill-name-telemetry
Open

feat(core): add skill name dimension to tool call telemetry (#18189)#28474
dimpavloff wants to merge 3 commits into
google-gemini:mainfrom
dimpavloff:skill-name-telemetry

Conversation

@dimpavloff

@dimpavloff dimpavloff commented Jul 21, 2026

Copy link
Copy Markdown

Summary

Add a skill_name dimension 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_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

Related Issues

Fixes #18189

How to Validate

  • unit tests

Pre-Merge Checklist

  • Added/updated tests (if needed)
  • Validated on required platforms/methods:
    • Linux
      • npm run

…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
@dimpavloff
dimpavloff requested a review from a team as a code owner July 21, 2026 13:57
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Telemetry Enhancement: Added an optional 'skill_name' dimension to tool call telemetry to provide better visibility into specific skill usage.
  • Metric Schema Updates: Updated 'TOOL_CALL_COUNT' and 'TOOL_CALL_LATENCY' attribute schemas in 'metrics.ts' to include the new 'skill_name' field.
  • Logic Implementation: Modified 'logToolCall' to extract the skill name from 'activate_skill' tool call arguments and pass it to the metrics recording function.
  • Testing: Added unit tests in 'loggers.test.ts' to ensure the 'skill_name' dimension is correctly captured and logged for 'activate_skill' calls.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions Bot added the size/m A medium sized PR label Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

📊 PR Size: size/M

  • Lines changed: 146
  • Additions: +144
  • Deletions: -2
  • Files changed: 3

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread packages/core/src/telemetry/loggers.ts
@gemini-cli gemini-cli Bot added priority/p3 Backlog - a good idea but not currently a priority. area/enterprise Issues related to Telemetry, Policy, Quota / Licensing labels Jul 21, 2026
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/enterprise Issues related to Telemetry, Policy, Quota / Licensing priority/p3 Backlog - a good idea but not currently a priority. size/m A medium sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telemetry: provide skill name details metric or metric dimension

1 participant