Files
google--adk-python/tests
Google Team Member c6dec00a6e feat(telemetry): add gen_ai.invoke_agent.{inference,tool}_calls metrics
Adds the two per-invocation call-count metrics from semconv #336
(open-telemetry/semantic-conventions-genai#336):

* gen_ai.invoke_agent.inference_calls: model calls in one invoke_agent span.
* gen_ai.invoke_agent.tool_calls: tool calls in one invoke_agent span.

Both are counted on the per-span TelemetryContext at the call sites
(record_inference_telemetry, record_tool_execution) and flushed in
record_agent_invocation, keyed by gen_ai.agent.name. One point per invoke_agent
span, so a multi-agent invocation does not double count. Failed calls still
count; only client-side tool calls count. Always emitted (a no-op without a
MeterProvider).

PiperOrigin-RevId: 940760757
2026-06-30 18:06:20 -07:00
..
2026-01-20 14:50:09 -08:00