ADK.Telemetry.DebugHandler (ADK v0.0.1-alpha.1)

Copy Markdown View Source

Telemetry handler that captures ADK events into ADK.Telemetry.SpanStore.

Attaches to all ADK.Telemetry.events() :stop events and builds span-like maps that are stored by event_id and session_id for the debug/trace HTTP endpoints.

Usage

Called automatically during application startup. Can also be attached manually:

ADK.Telemetry.DebugHandler.attach()

Span Format

Each captured span is a map with:

%{
  name: "adk.agent.stop",
  span_id: "a1b2c3...",
  trace_id: "d4e5f6...",
  start_time: 1710000000.0,
  end_time: 1710000001.5,
  duration_ms: 1500.0,
  attributes: %{agent_name: "my_agent", session_id: "sess-1", ...}
}

Summary

Functions

Attach the debug handler to all ADK telemetry stop events.

Detach the debug handler.

Functions

attach()

@spec attach() :: :ok | {:error, :already_exists}

Attach the debug handler to all ADK telemetry stop events.

detach()

@spec detach() :: :ok | {:error, :not_found}

Detach the debug handler.