OpenInference Google ADK Instrumentation
Auto-instrument Google ADK agents with OpenTelemetry-compatible tracing
Repository Health
Technical Analysis
OpenInference Google ADK Instrumentation is a Python auto-instrumentation library that captures traces from applications built with Google’s Agent Development Kit (ADK). It records agent runs, model calls, and tool invocations as OpenTelemetry-compatible spans, following the OpenInference semantic conventions for LLM and agent observability.
The emitted traces can be exported to any OpenTelemetry collector, including Arize Phoenix and Arize AX, giving developers visibility into prompts, responses, tool usage, and latency. Instrumentation is enabled with a single call, requiring no changes to existing ADK agent code.
What You Get
- One-line auto-instrumentation of Google ADK via GoogleADKInstrumentor().instrument()
- OpenTelemetry-compatible spans that export to Phoenix, Arize AX, or any OTel collector
- OpenInference semantic conventions capturing prompts, responses, and tool calls
- No changes required to existing ADK agent code to start collecting traces
- Runnable examples showing a full Gemini-based agent traced end to end
Common Use Cases
- Debugging and observing Google ADK agents during development
- Monitoring LLM latency, token usage, and tool calls in production
- Feeding agent traces into Arize Phoenix for evaluation and analysis
Under The Hood
Architecture - The package is small and focused: src/openinference/instrumentation/google_adk/__init__.py exposes GoogleADKInstrumentor, a subclass of OpenTelemetry’s BaseInstrumentor, whose _instrument/_uninstrument hooks wrap Google ADK’s runtime entry points. The wrapping logic in _wrappers.py starts spans around agent runs, model calls, and tool executions and annotates them with OpenInference semantic-convention attributes. It shares the openinference.instrumentation namespace package with the rest of the monorepo’s instrumentors.
Tech Stack - Python packaged with pyproject.toml, built on opentelemetry-api/sdk, the opentelemetry-instrumentation base classes, and OpenInference semantic conventions; it wraps google-adk/google-genai. It ships py.typed for type checking.
Code Quality - The package includes a tests/ directory and runnable examples/, a CHANGELOG, and follows the consistent structure and CI of the well-maintained Arize openinference monorepo.
API Design - Developer experience is a strength: a single GoogleADKInstrumentor().instrument(tracer_provider=...) call turns on tracing with no changes to agent code, mirroring the uniform API of every other OpenInference instrumentor, which makes it easy to learn if you know one of them.