pub struct NullTracer;Expand description
A no-op implementation of TracerSystem that silently discards all tracing operations
This class follows the Null Object Pattern to eliminate conditional checks in client code. All record methods are overridden to do nothing, and all query methods return empty results.
Implementations§
Source§impl NullTracer
impl NullTracer
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Always returns false for null tracer
Sourcepub fn record_event(&self, _event: Box<dyn TracerEvent>)
pub fn record_event(&self, _event: Box<dyn TracerEvent>)
Do nothing implementation of record_event
Sourcepub fn record_llm_call(
&self,
_model: impl Into<String>,
_messages: Vec<HashMap<String, Value>>,
_temperature: f64,
_tools: Option<Vec<HashMap<String, Value>>>,
_source: impl Into<String>,
_correlation_id: impl Into<String>,
)
pub fn record_llm_call( &self, _model: impl Into<String>, _messages: Vec<HashMap<String, Value>>, _temperature: f64, _tools: Option<Vec<HashMap<String, Value>>>, _source: impl Into<String>, _correlation_id: impl Into<String>, )
Do nothing implementation of record_llm_call
Sourcepub fn record_llm_response(
&self,
_model: impl Into<String>,
_content: impl Into<String>,
_tool_calls: Option<Vec<HashMap<String, Value>>>,
_call_duration_ms: Option<f64>,
_source: impl Into<String>,
_correlation_id: impl Into<String>,
)
pub fn record_llm_response( &self, _model: impl Into<String>, _content: impl Into<String>, _tool_calls: Option<Vec<HashMap<String, Value>>>, _call_duration_ms: Option<f64>, _source: impl Into<String>, _correlation_id: impl Into<String>, )
Do nothing implementation of record_llm_response
Sourcepub fn record_tool_call(
&self,
_tool_name: impl Into<String>,
_arguments: HashMap<String, Value>,
_result: Value,
_caller: Option<String>,
_call_duration_ms: Option<f64>,
_source: impl Into<String>,
_correlation_id: impl Into<String>,
)
pub fn record_tool_call( &self, _tool_name: impl Into<String>, _arguments: HashMap<String, Value>, _result: Value, _caller: Option<String>, _call_duration_ms: Option<f64>, _source: impl Into<String>, _correlation_id: impl Into<String>, )
Do nothing implementation of record_tool_call
Sourcepub fn record_agent_interaction(
&self,
_from_agent: impl Into<String>,
_to_agent: impl Into<String>,
_event_type: impl Into<String>,
_event_id: Option<String>,
_source: impl Into<String>,
_correlation_id: impl Into<String>,
)
pub fn record_agent_interaction( &self, _from_agent: impl Into<String>, _to_agent: impl Into<String>, _event_type: impl Into<String>, _event_id: Option<String>, _source: impl Into<String>, _correlation_id: impl Into<String>, )
Do nothing implementation of record_agent_interaction
Sourcepub fn get_event_summaries(
&self,
_start_time: Option<f64>,
_end_time: Option<f64>,
_filter_func: Option<&dyn EventFilterFn>,
) -> Vec<String>
pub fn get_event_summaries( &self, _start_time: Option<f64>, _end_time: Option<f64>, _filter_func: Option<&dyn EventFilterFn>, ) -> Vec<String>
Return an empty vector for any get_event_summaries request
Sourcepub fn get_last_n_summaries(
&self,
_n: usize,
_filter_func: Option<&dyn EventFilterFn>,
) -> Vec<String>
pub fn get_last_n_summaries( &self, _n: usize, _filter_func: Option<&dyn EventFilterFn>, ) -> Vec<String>
Return an empty vector for any get_last_n_summaries request
Sourcepub fn count_events(
&self,
_start_time: Option<f64>,
_end_time: Option<f64>,
_filter_func: Option<&dyn EventFilterFn>,
) -> usize
pub fn count_events( &self, _start_time: Option<f64>, _end_time: Option<f64>, _filter_func: Option<&dyn EventFilterFn>, ) -> usize
Return 0 for any count_events request
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NullTracer
impl RefUnwindSafe for NullTracer
impl Send for NullTracer
impl Sync for NullTracer
impl Unpin for NullTracer
impl UnwindSafe for NullTracer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more