Skip to content

Commit a68a10a

Browse files
committed
Add information about 2 additional metrics with note about opentelemetry-instrumentation-google-genai.
1 parent adbdcf5 commit a68a10a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

docs/observability/metrics.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ When metrics are enabled, ADK automatically instruments the agent's lifecycle, w
2828
| **`gen_ai.agent.request.size`** | Histogram | The size or complexity of the incoming request sent to the agent. | `gen_ai.agent.name` |
2929
| **`gen_ai.agent.response.size`** | Histogram | The size or complexity of the final response generated by the agent. | `gen_ai.agent.name` |
3030
| **`gen_ai.agent.workflow.steps`** | Histogram | Tracks the number of iterative steps or reasoning loops an agent takes to complete a workflow. | `gen_ai.agent.name` |
31+
| **`gen_ai.client.operation.duration`*** | Histogram | The duration of GenAI client operations (e.g., LLM calls). | `gen_ai.agent.name`, `gen_ai.agent.version`, `error.type` |
32+
| **`gen_ai.client.token.usage`*** | Histogram | Token consumption for GenAI client operations. | `gen_ai.agent.name`, `gen_ai.agent.version` |
33+
34+
\* **Note:** ADK natively emits `gen_ai.client.operation.duration` and `gen_ai.client.token.usage`. However, if the `opentelemetry-instrumentation-google-genai` package is installed, ADK suppresses its native emission of these metrics to avoid duplicates. In that case, the metrics will lack the agentic attributes (`gen_ai.agent.name`, `gen_ai.agent.version`).
3135

3236
---
3337

0 commit comments

Comments
 (0)