Setup
- Python
Usage
Once initialized, ADK agent runs, tool calls, and Gemini calls are captured automatically:Usage with the ADK CLI
If you run your agent withadk run or adk web, initialize TraceRoot at the top of agent.py:
adk web and adk api_server install their own OpenTelemetry tracer provider before agent.py loads. From traceroot 0.3.0, @observe spans are traced alongside ADK’s spans in these modes. On 0.2.0, ADK’s spans still arrive but @observe spans are dropped; use adk run or your own runner instead.Usage with Workflows
ADK 2.x runs agents, tools, and plain Python functions as nodes of a graphWorkflow. Each workflow run, node, fan-out, and join is traced:
Workflow and node spans need the first
traceroot release after 0.2.0. On 0.2.0, only the Agent nodes of a workflow appear.What Gets Captured
Model aliases such as
gemini-flash-latest are not priced; pin a model id to get cost.
Run the example
Clone the repo and run a complete agent end-to-end.Agent
Run the Python agent example
Workflow
Run the Python workflow example