qwen-code/packages/core/src
Jerop Kipruto 714421c2da
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`):
![image](https://github.com/user-attachments/assets/3e8f8ea9-6155-4186-863c-075cc47647c5)

Here is a stacked bar chart of file operations by type (`create`, `read`, `update`):
![image](https://github.com/user-attachments/assets/3fcf491d-31d0-4ba8-80e6-7fd2bd9c7c27)

#750 

cc @allenhutchison as discussed
2025-06-15 13:24:53 -07:00
..
__mocks__/fs Rename server->core (#638) 2025-05-30 18:25:47 -07:00
code_assist fix: remove quota project override in non-streaming calls to CCPA (#1032) 2025-06-14 01:23:12 +00:00
config fix(core): Improve shell tool reliability and test portability (#1036) 2025-06-15 09:19:19 +00:00
core Stabilize prompts snapshot test by properly mocking the SANDBOX env var. (#1067) 2025-06-15 11:33:30 -07:00
services centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
telemetry Add file operation telemetry (#1068) 2025-06-15 13:24:53 -07:00
tools Add file operation telemetry (#1068) 2025-06-15 13:24:53 -07:00
utils Add file operation telemetry (#1068) 2025-06-15 13:24:53 -07:00
index.test.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
index.ts feat: Add token stats in footer (#909) 2025-06-15 11:15:53 -07:00