qwen-code/packages/core/src/utils
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
..
bfsFileSearch.test.ts centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
bfsFileSearch.ts centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
editCorrector.test.ts Address b/424256913 - fixed error in correctStringEscaping() and improved backslash handling (#1007) 2025-06-14 13:39:34 -04:00
editCorrector.ts Address b/424256913 - fixed error in correctStringEscaping() and improved backslash handling (#1007) 2025-06-14 13:39:34 -04:00
editor.test.ts feat: External editor settings (#882) 2025-06-11 18:21:54 -07:00
editor.ts feat: External editor settings (#882) 2025-06-11 18:21:54 -07:00
errorReporting.test.ts Remove unneeded mockRestore()s from tests (#919) 2025-06-10 20:32:00 -07:00
errorReporting.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
errors.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
fetch.ts Improvements to web-fetch tool (#1030) 2025-06-13 17:44:14 -07:00
fileUtils.test.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
fileUtils.ts Add file operation telemetry (#1068) 2025-06-15 13:24:53 -07:00
generateContentResponseUtilities.test.ts Telemetry: Improve API response logging with function call details (#1064) 2025-06-15 01:48:01 -04:00
generateContentResponseUtilities.ts Telemetry: Improve API response logging with function call details (#1064) 2025-06-15 01:48:01 -04:00
getFolderStructure.test.ts centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
getFolderStructure.ts centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
gitIgnoreParser.test.ts centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
gitIgnoreParser.ts centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
gitUtils.ts Ignore folders files (#651) 2025-06-04 04:40:46 +00:00
LruCache.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
memoryDiscovery.test.ts initialize FileDiscoveryService once (#1029) 2025-06-13 17:25:59 -07:00
memoryDiscovery.ts initialize FileDiscoveryService once (#1029) 2025-06-13 17:25:59 -07:00
messageInspectors.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
nextSpeakerChecker.test.ts refactor(telemetry): pass config object to telemetry functions 2025-06-11 13:24:41 -04:00
nextSpeakerChecker.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
paths.ts Modify shortenPath and add param validation (#663) 2025-06-03 08:59:17 -07:00
retry.test.ts Remove unneeded mockRestore()s from tests (#919) 2025-06-10 20:32:00 -07:00
retry.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
schemaValidator.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
session.ts refactor: Centralize session ID generation and propagation 2025-06-11 01:18:40 -04:00