Google ADK
cetra reads the spans that Google’s Agent Development Kit emits itself, and the spans of OpenInference’s ADK instrumentation.
Point the exporter at cetra
Section titled “Point the exporter at cetra”ADK emits OpenTelemetry spans through the global tracer provider. Install a provider that exports to cetra before you run the agent. This is the setup the fixtures were captured with, with the endpoint and the key changed.
from opentelemetry import tracefrom opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporterfrom opentelemetry.sdk.trace import TracerProviderfrom opentelemetry.sdk.trace.export import BatchSpanProcessor
provider = TracerProvider()provider.add_span_processor( BatchSpanProcessor( OTLPSpanExporter( endpoint="http://localhost:8080/v1/traces", headers={"Authorization": "Bearer <SK_CETRA_KEY>"}, ) ))trace.set_tracer_provider(provider)
# Build and run your ADK agent as usual, then:provider.shutdown()Replace <SK_CETRA_KEY> with your sk-cetra- API key. See Send OpenTelemetry.
What you get
Section titled “What you get”With ADK’s own spans, a run with one tool produces:
- an
invocationspan, and anagentspan for the agent; - a
chainspan for eachcall_llm, with the model, the instructions and the tool declarations; - an
llmspan for each model call, with the provider, token counts and cost; - a
toolspan for eachexecute_tool.
The session ID of the ADK session is the cetra session. Streaming runs and runs with thinking enabled are captured, and reasoning tokens are added to the output count.
OpenInference’s ADK instrumentation
Section titled “OpenInference’s ADK instrumentation”You can use openinference-instrumentation-google-adk instead. Its spans carry the session and the user, and the call_llm span is the llm span.
Limits
Section titled “Limits”- The fixtures were captured with
google-adk2.14.0 andgoogle-genai2.34.0, and withopeninference-instrumentation-google-adk1.1.0. cetra-sdkhas noinstrumentname for ADK.
- Traces: read the trace as a tree and a timeline.
- Cost and tokens: how cost is computed from the token counts.
- Online rules: score these traces automatically.