Skip to main content

GalileoTracingProcessor

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).

add_galileo_custom_span

Add a Galileo custom span to the trace.

force_flush

Forces an immediate flush of all queued traces/spans.

on_span_end

Called when an OpenAI Agent span ends.

on_span_start

Called when an OpenAI Agent span starts.

on_trace_end

Called when an OpenAI Agent trace ends.

on_trace_start

Called when an OpenAI Agent trace starts.

shutdown

Called when the application stops. Flushes any remaining logs.