Skip to main content
Google ADK (Agent Development Kit) is Google’s Python framework for building agents that combine Gemini models with tools, sessions, and runners. Arize AX captures every ADK run — agent invocations, tool calls, and the underlying Gemini calls — via the openinference-instrumentation-google-adk package.
https://storage.googleapis.com/arize-phoenix-assets/assets/images/phoenix-docs-images/gc.ico

Google ADK Tracing Tutorial (Google Colab)

Prerequisites

Launch Arize AX

  1. Sign in to your Arize AX account.
  2. From Space Settings, copy your Space ID and API Key. You will set them as ARIZE_SPACE_ID and ARIZE_API_KEY below.

Install

Configure credentials

Setup tracing

When deploying to Vertex AI Agent Engine, the same register(...) + GoogleADKInstrumentor().instrument(...) calls must run inside the remote agent module (the file you pass to agent_engines.create(...)), not in the local driver script. Local instrumentation does not propagate to the remote runtime.

Run Google ADK

Expected output

Verify in Arize AX

  1. Open your Arize AX space and select project google-adk-tracing-example.
  2. You should see a new trace within ~30 seconds with this shape: an invocation [ocean_app] root span (CHAIN) wraps an agent_run [ocean_agent] span (AGENT), which wraps two call_llm spans (LLM, model gemini-2.5-flash — the first emits the function call, the second consumes the tool result) and an execute_tool get_ocean_salinity span (TOOL). Prompts, responses, and token usage are attached to the LLM spans.
  3. If no traces appear, see Troubleshooting.

Check from the skill, CLI, or SDK

Confirm spans are actually reaching your Arize AX project. Use whichever fits your workflow — the skill and CLI work for any framework; the SDK check is shown for each language.
Install the Arize Skills plugin and let your coding agent check for you:
Then prompt your agent:
Use the arize-trace skill to export and analyze recent traces from my project. Confirm spans are arriving, and summarize any errors or latency issues.

Troubleshooting

  • No traces in Arize AX. Confirm ARIZE_SPACE_ID and ARIZE_API_KEY are set in the same shell that runs example.py. Enable OpenTelemetry debug logs with export OTEL_LOG_LEVEL=debug and re-run.
  • ADK spans missing but other spans present. GoogleADKInstrumentor().instrument(...) must run before any from google.adk import .... Make sure instrumentation.py is the first import in your entry point.
  • 401 / 403 from Gemini. Verify GEMINI_API_KEY is set and has access to gemini-2.5-flash. ADK also accepts GOOGLE_API_KEY; if you set both, GEMINI_API_KEY takes precedence.
  • 404 NOT_FOUND for the model. Google occasionally retires older Gemini aliases for new users. Swap gemini-2.5-flash for a model your key can call.
  • Vertex AI / Agent Engine deployments. Set GOOGLE_GENAI_USE_VERTEXAI=true plus GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION, and run register(...) + GoogleADKInstrumentor().instrument(...) inside the remote agent module — not in the local driver. See the Google ADK observability guide for the full Agent Engine snippet.

Resources

Google ADK Documentation

OpenInference Google ADK Instrumentor

Google ADK Python SDK

ADK Sample: Travel Concierge (multi-agent)