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 theDocumentation Index
Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
openinference-instrumentation-google-adk package.
Google ADK Tracing Tutorial (Google Colab)
Prerequisites
- Python 3.10+
- An Arize AX account (sign up)
- A
GEMINI_API_KEYfrom Google AI Studio
Launch Arize AX
- Sign in to your Arize AX account.
- From Space Settings, copy your Space ID and API Key. You will set them as
ARIZE_SPACE_IDandARIZE_API_KEYbelow.
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
- Open your Arize AX space and select project
google-adk-tracing-example. - You should see a new trace within ~30 seconds with this shape: an
invocation [ocean_app]root span (CHAIN) wraps anagent_run [ocean_agent]span (AGENT), which wraps twocall_llmspans (LLM, modelgemini-2.5-flash— the first emits the function call, the second consumes the tool result) and anexecute_tool get_ocean_salinityspan (TOOL). Prompts, responses, and token usage are attached to the LLM spans. - If no traces appear, see Troubleshooting.
Troubleshooting
- No traces in Arize AX. Confirm
ARIZE_SPACE_IDandARIZE_API_KEYare set in the same shell that runsexample.py. Enable OpenTelemetry debug logs withexport OTEL_LOG_LEVEL=debugand re-run. - ADK spans missing but other spans present.
GoogleADKInstrumentor().instrument(...)must run before anyfrom google.adk import .... Make sureinstrumentation.pyis the first import in your entry point. 401/403from Gemini. VerifyGEMINI_API_KEYis set and has access togemini-2.5-flash. ADK also acceptsGOOGLE_API_KEY; if you set both,GEMINI_API_KEYtakes precedence.404 NOT_FOUNDfor the model. Google occasionally retires older Gemini aliases for new users. Swapgemini-2.5-flashfor a model your key can call.- Vertex AI / Agent Engine deployments. Set
GOOGLE_GENAI_USE_VERTEXAI=trueplusGOOGLE_CLOUD_PROJECTandGOOGLE_CLOUD_LOCATION, and runregister(...)+GoogleADKInstrumentor().instrument(...)inside the remote agent module — not in the local driver. See the Google ADK observability guide for the full Agent Engine snippet.