ETS-backed store for debug/trace span data.
Stores span data in two ETS tables:
adk_event_spans— keyed by event_id, stores span attributesadk_session_spans— keyed by session_id, stores lists of span data
Provides the backing store for the /debug/trace/ HTTP endpoints that match
Python ADK's debug API.
TTL
Entries are automatically pruned after a configurable max age (default 30 minutes). Configure via application env:
config :adk, :span_store_ttl_ms, 1_800_000Usage
ADK.Telemetry.SpanStore.put_event_span("evt-123", %{name: "agent.run", ...})
ADK.Telemetry.SpanStore.get_event_span("evt-123")
#=> {:ok, %{name: "agent.run", ...}}
ADK.Telemetry.SpanStore.put_session_span("sess-1", %{name: "agent.run", ...})
ADK.Telemetry.SpanStore.get_session_spans("sess-1")
#=> [%{name: "agent.run", ...}]
Summary
Functions
Returns a specification to start this module under a supervisor.
Clear all stored spans (useful for testing).
Retrieve span attributes for an event_id.
Retrieve all spans for a session_id.
Store span attributes keyed by event_id.
Store a span for a session_id (appended to existing list).
Start the SpanStore as part of a supervision tree.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec clear() :: :ok
Clear all stored spans (useful for testing).
Retrieve span attributes for an event_id.
Retrieve all spans for a session_id.
Store span attributes keyed by event_id.
Store a span for a session_id (appended to existing list).
Start the SpanStore as part of a supervision tree.