Skip to main content

Installation

pip install -e ./sdk/tracectrl
pip install -e ./sdk/tracectrl-instrumentation-google-adk

Usage

import tracectrl
tracectrl.configure(service_name="my-adk-agent")

from tracectrl.instrumentation.google_adk import ADKInstrumentor
ADKInstrumentor().instrument()

# Your Google ADK code
from google.adk import Agent

agent = Agent(model="gemini-2.0-flash", tools=[...])
agent.run("Plan my trip")

What Gets Captured

Google ADK agents generate spans for:
  • Agent execution lifecycle
  • Gemini model calls with model name and parameters
  • Tool invocations with risk category classification
  • Input/output values for each step

API

ADKInstrumentor()

instrument
method
instrument(tracer_provider=None, skip_dep_check=False) — Registers the TraceCtrl span processor and wraps the OpenInference Google ADK instrumentor.
uninstrument
method
uninstrument() — Shuts down processors and unwraps the instrumentor.