mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user