From a68a10ad0c9a48e8f2f78d23798076ac638b2ada Mon Sep 17 00:00:00 2001 From: Mateusz Henc Date: Wed, 29 Apr 2026 15:30:08 +0200 Subject: [PATCH] Add information about 2 additional metrics with note about opentelemetry-instrumentation-google-genai. --- docs/observability/metrics.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/observability/metrics.md b/docs/observability/metrics.md index c424d83740..5d2aaa2ef6 100644 --- a/docs/observability/metrics.md +++ b/docs/observability/metrics.md @@ -28,6 +28,10 @@ When metrics are enabled, ADK automatically instruments the agent's lifecycle, w | **`gen_ai.agent.request.size`** | Histogram | The size or complexity of the incoming request sent to the agent. | `gen_ai.agent.name` | | **`gen_ai.agent.response.size`** | Histogram | The size or complexity of the final response generated by the agent. | `gen_ai.agent.name` | | **`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` | +| **`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` | +| **`gen_ai.client.token.usage`*** | Histogram | Token consumption for GenAI client operations. | `gen_ai.agent.name`, `gen_ai.agent.version` | + +\* **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`). ---