handlers
handlers.openai_agents
GalileoTracingProcessor Objects
OpenAI Agents TracingProcessor for logging traces to Galileo.
Builds a tree of spans during agent execution and logs them hierarchically to Galileo upon trace completion.
Arguments:
_galileo_logger
(GalileoLogger
): The Galileo logger instance._flush_on_trace_end
(bool
): Whether to automatically flush the log batch to Galileo when a trace ends._nodes
(dict[str, Node]
): Stores Node objects keyed by their OpenAI span_id or trace_id (for root).
on_trace_start
Called when an OpenAI Agent trace starts.
on_trace_end
Called when an OpenAI Agent trace ends.
on_span_start
Called when an OpenAI Agent span starts.
on_span_end
Called when an OpenAI Agent span ends.
shutdown
Called when the application stops. Flushes any remaining logs.
force_flush
Forces an immediate flush of all queued traces/spans.