Skip to main content
OpenTelemetry instrumentor for Google ADK (Agent Development Kit) agents. This instrumentor sets up an isolated Fiddler tracing pipeline via FiddlerClient (provider, processor, exporter) and promotes it to the global tracer provider so ADK’s gcp.vertex.agent tracer resolves to it. The SDK operates in standalone mode — it does not interact with customer-configured tracers or providers.

Example

from fiddler_otel import FiddlerClient
from fiddler_adk import GoogleADKInstrumentor

client = FiddlerClient(
    api_key="YOUR_KEY",
    application_id="YOUR_APP_UUID",
    url="https://your-instance.com",
)

# Enable instrumentation
instrumentor = GoogleADKInstrumentor(client)
instrumentor.instrument()

# All ADK agents created after this point are automatically traced

Parameters

client
FiddlerClient
required
FiddlerClient instance that owns the tracing pipeline (tracer, provider, processor, exporter). The client’s provider is promoted to global so ADK’s tracer resolves to it.

instrument()

Enable instrumentation. Sets up the tracer provider and adds the ADKSpanProcessor for session-ID propagation.
instrumentor.instrument()

Returns

No return value. After calling, all ADK agents will be traced.

uninstrument()

Disable instrumentation. The tracer provider wiring is left in place: OpenTelemetry does not support unsetting the global provider or removing span processors. Spans continue to be exported until the client is shut down.
instrumentor.uninstrument()

Returns

No return value.

instrumentation_dependencies()

Return the list of packages required for instrumentation.

Returns

Collection of required package names (includes google-adk).