diff options
| author | Jerop Kipruto <[email protected]> | 2025-06-15 16:24:53 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-15 13:24:53 -0700 |
| commit | 714421c2da4f5d6b9c1c7060fdf5c47ba1c965ca (patch) | |
| tree | 488459669757dda99eda46b621a030ece38842dd /packages/core/src/telemetry/constants.ts | |
| parent | 4421ef126fc6a2de89132aa35c261bf78cd481d2 (diff) | |
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
Diffstat (limited to 'packages/core/src/telemetry/constants.ts')
| -rw-r--r-- | packages/core/src/telemetry/constants.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/core/src/telemetry/constants.ts b/packages/core/src/telemetry/constants.ts index bbcdbada..de760205 100644 --- a/packages/core/src/telemetry/constants.ts +++ b/packages/core/src/telemetry/constants.ts @@ -19,3 +19,4 @@ export const METRIC_API_REQUEST_COUNT = 'gemini_cli.api.request.count'; export const METRIC_API_REQUEST_LATENCY = 'gemini_cli.api.request.latency'; export const METRIC_TOKEN_USAGE = 'gemini_cli.token.usage'; export const METRIC_SESSION_COUNT = 'gemini_cli.session.count'; +export const METRIC_FILE_OPERATION_COUNT = 'gemini_cli.file.operation.count'; |
