2025-06-05 16:04:25 -04:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2025-06-07 14:27:22 -07:00
|
|
|
export const SERVICE_NAME = 'gemini-cli';
|
2025-06-05 16:04:25 -04:00
|
|
|
|
2025-06-11 05:22:13 +00:00
|
|
|
export const EVENT_USER_PROMPT = 'gemini_cli.user_prompt';
|
|
|
|
|
export const EVENT_TOOL_CALL = 'gemini_cli.tool_call';
|
|
|
|
|
export const EVENT_API_REQUEST = 'gemini_cli.api_request';
|
|
|
|
|
export const EVENT_API_ERROR = 'gemini_cli.api_error';
|
|
|
|
|
export const EVENT_API_RESPONSE = 'gemini_cli.api_response';
|
|
|
|
|
export const EVENT_CLI_CONFIG = 'gemini_cli.config';
|
2025-09-23 14:37:35 -04:00
|
|
|
export const EVENT_EXTENSION_DISABLE = 'gemini_cli.extension_disable';
|
2025-09-18 14:01:36 -04:00
|
|
|
export const EVENT_EXTENSION_ENABLE = 'gemini_cli.extension_enable';
|
|
|
|
|
export const EVENT_EXTENSION_INSTALL = 'gemini_cli.extension_install';
|
|
|
|
|
export const EVENT_EXTENSION_UNINSTALL = 'gemini_cli.extension_uninstall';
|
2025-07-12 02:40:25 +05:30
|
|
|
export const EVENT_FLASH_FALLBACK = 'gemini_cli.flash_fallback';
|
2025-09-08 14:44:56 -07:00
|
|
|
export const EVENT_RIPGREP_FALLBACK = 'gemini_cli.ripgrep_fallback';
|
2025-07-30 21:47:04 -07:00
|
|
|
export const EVENT_NEXT_SPEAKER_CHECK = 'gemini_cli.next_speaker_check';
|
2025-07-29 16:20:37 -04:00
|
|
|
export const EVENT_SLASH_COMMAND = 'gemini_cli.slash_command';
|
2025-08-05 18:52:58 -04:00
|
|
|
export const EVENT_IDE_CONNECTION = 'gemini_cli.ide_connection';
|
2025-08-25 16:06:47 -04:00
|
|
|
export const EVENT_CONVERSATION_FINISHED = 'gemini_cli.conversation_finished';
|
2025-08-18 15:59:13 -04:00
|
|
|
export const EVENT_CHAT_COMPRESSION = 'gemini_cli.chat_compression';
|
2025-08-24 19:11:41 -07:00
|
|
|
export const EVENT_MALFORMED_JSON_RESPONSE =
|
|
|
|
|
'gemini_cli.malformed_json_response';
|
2025-08-26 15:37:18 -04:00
|
|
|
export const EVENT_INVALID_CHUNK = 'gemini_cli.chat.invalid_chunk';
|
|
|
|
|
export const EVENT_CONTENT_RETRY = 'gemini_cli.chat.content_retry';
|
|
|
|
|
export const EVENT_CONTENT_RETRY_FAILURE =
|
|
|
|
|
'gemini_cli.chat.content_retry_failure';
|
2025-09-04 10:20:46 -07:00
|
|
|
export const EVENT_FILE_OPERATION = 'gemini_cli.file_operation';
|
2025-09-23 18:06:03 -04:00
|
|
|
export const EVENT_MODEL_SLASH_COMMAND = 'gemini_cli.slash_command.model';
|
2025-06-11 05:22:13 +00:00
|
|
|
export const METRIC_TOOL_CALL_COUNT = 'gemini_cli.tool.call.count';
|
|
|
|
|
export const METRIC_TOOL_CALL_LATENCY = 'gemini_cli.tool.call.latency';
|
|
|
|
|
export const METRIC_API_REQUEST_COUNT = 'gemini_cli.api.request.count';
|
|
|
|
|
export const METRIC_API_REQUEST_LATENCY = 'gemini_cli.api.request.latency';
|
2025-06-11 06:56:53 +00:00
|
|
|
export const METRIC_TOKEN_USAGE = 'gemini_cli.token.usage';
|
2025-06-11 05:22:13 +00:00
|
|
|
export const METRIC_SESSION_COUNT = 'gemini_cli.session.count';
|
Add file operation telemetry (#1068)
Introduces telemetry for file create, read, and update operations.
This change adds the `gemini_cli.file.operation.count` metric, recorded by the `read-file`, `read-many-files`, and `write-file` tools.
The metric includes the following attributes:
- `operation` (string: `create`, `read`, `update`): The type of file operation.
- `lines` (optional, Int): Number of lines in the file.
- `mimetype` (optional, string): Mimetype of the file.
- `extension` (optional, string): File extension of the file.
Here is a stacked bar chart of file operations by extension (`js`, `ts`, `md`):

Here is a stacked bar chart of file operations by type (`create`, `read`, `update`):

#750
cc @allenhutchison as discussed
2025-06-15 16:24:53 -04:00
|
|
|
export const METRIC_FILE_OPERATION_COUNT = 'gemini_cli.file.operation.count';
|
2025-08-22 19:06:29 -04:00
|
|
|
export const METRIC_INVALID_CHUNK_COUNT = 'gemini_cli.chat.invalid_chunk.count';
|
|
|
|
|
export const METRIC_CONTENT_RETRY_COUNT = 'gemini_cli.chat.content_retry.count';
|
|
|
|
|
export const METRIC_CONTENT_RETRY_FAILURE_COUNT =
|
|
|
|
|
'gemini_cli.chat.content_retry_failure.count';
|
2025-09-16 16:53:58 -04:00
|
|
|
export const EVENT_MODEL_ROUTING = 'gemini_cli.model_routing';
|
|
|
|
|
export const METRIC_MODEL_ROUTING_LATENCY = 'gemini_cli.model_routing.latency';
|
|
|
|
|
export const METRIC_MODEL_ROUTING_FAILURE_COUNT =
|
|
|
|
|
'gemini_cli.model_routing.failure.count';
|
2025-09-23 18:06:03 -04:00
|
|
|
export const METRIC_MODEL_SLASH_COMMAND_CALL_COUNT =
|
|
|
|
|
'gemini_cli.slash_command.model.call_count';
|