From 03bc1f314121c381ac4fe19f031fe90fbcf95179 Mon Sep 17 00:00:00 2001 From: jerop Date: Wed, 11 Jun 2025 17:47:21 +0000 Subject: feat(telemetry): Update API response in telemetry Adds the text content of the API response to the telemetry event. This provides more context for debugging and analysis without logging the entire, potentially large, response object. - Adds an optional field to the type. - Updates to include the field in the logged attributes. - Modifies the to extract the response text using and pass it to the logger. - Adds a new test file for the telemetry loggers, including tests for the function to verify the new functionality. --- docs/core/telemetry.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/core') diff --git a/docs/core/telemetry.md b/docs/core/telemetry.md index aec63e80..e7b82b65 100644 --- a/docs/core/telemetry.md +++ b/docs/core/telemetry.md @@ -291,7 +291,7 @@ These are timestamped records of specific events. - **Attributes**: - `model` - `duration_ms` - - `prompt_token_count` + - `input_token_count` - `gemini_cli.api_error`: Fired if the API request fails. @@ -310,6 +310,11 @@ These are timestamped records of specific events. - `duration_ms` - `error` (optional) - `attempt` + - `output_token_count` + - `cached_content_token_count` + - `thoughts_token_count` + - `tool_token_count` + - `response_text` (optional) ### Metrics -- cgit v1.2.3