pub struct ExecutionMonitor { /* private fields */ }Expand description
Execution monitor for tracking and debugging agent behavior
Implementations§
Source§impl ExecutionMonitor
impl ExecutionMonitor
Sourcepub fn start_execution(
&self,
agent_id: Option<Uuid>,
behavior_name: Option<String>,
) -> Uuid
pub fn start_execution( &self, agent_id: Option<Uuid>, behavior_name: Option<String>, ) -> Uuid
Start monitoring an execution
Sourcepub fn end_execution(
&self,
execution_id: Uuid,
result: Result<DslValue>,
) -> Option<Duration>
pub fn end_execution( &self, execution_id: Uuid, result: Result<DslValue>, ) -> Option<Duration>
End monitoring an execution
Sourcepub fn add_trace(&self, entry: TraceEntry)
pub fn add_trace(&self, entry: TraceEntry)
Add a trace entry
Sourcepub fn log_agent_event(&self, agent: &AgentInstance, event_type: TraceEventType)
pub fn log_agent_event(&self, agent: &AgentInstance, event_type: TraceEventType)
Log agent lifecycle event
Sourcepub fn log_function_call(
&self,
execution_id: Option<Uuid>,
function_name: &str,
args: &[DslValue],
)
pub fn log_function_call( &self, execution_id: Option<Uuid>, function_name: &str, args: &[DslValue], )
Log function call
Sourcepub fn log_capability_check(
&self,
agent_id: Option<Uuid>,
capability: &str,
allowed: bool,
)
pub fn log_capability_check( &self, agent_id: Option<Uuid>, capability: &str, allowed: bool, )
Log capability check
Sourcepub fn log_variable_assignment(
&self,
execution_id: Option<Uuid>,
var_name: &str,
value: &DslValue,
)
pub fn log_variable_assignment( &self, execution_id: Option<Uuid>, var_name: &str, value: &DslValue, )
Log variable assignment
Sourcepub fn get_traces(&self, limit: Option<usize>) -> Vec<TraceEntry>
pub fn get_traces(&self, limit: Option<usize>) -> Vec<TraceEntry>
Get execution traces
Sourcepub fn get_agent_traces(
&self,
agent_id: Uuid,
limit: Option<usize>,
) -> Vec<TraceEntry>
pub fn get_agent_traces( &self, agent_id: Uuid, limit: Option<usize>, ) -> Vec<TraceEntry>
Get traces for a specific agent
Sourcepub fn get_stats(&self) -> ExecutionStats
pub fn get_stats(&self) -> ExecutionStats
Get execution statistics
Sourcepub fn get_active_executions(&self) -> Vec<ExecutionContext>
pub fn get_active_executions(&self) -> Vec<ExecutionContext>
Get active executions
Sourcepub fn clear_traces(&self)
pub fn clear_traces(&self)
Clear all traces
Sourcepub fn generate_report(&self) -> String
pub fn generate_report(&self) -> String
Generate execution report
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecutionMonitor
impl RefUnwindSafe for ExecutionMonitor
impl Send for ExecutionMonitor
impl Sync for ExecutionMonitor
impl Unpin for ExecutionMonitor
impl UnwindSafe for ExecutionMonitor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more