pub struct ExecutionTrace { /* private fields */ }Expand description
Mutable trace collector used during agent execution.
Uses interior mutability (Mutex) so it can be shared across
async tasks via Arc<ExecutionTrace>.
Implementations§
Source§impl ExecutionTrace
impl ExecutionTrace
Sourcepub fn record_tool_call(&self, trace: ToolCallTrace)
pub fn record_tool_call(&self, trace: ToolCallTrace)
Record a tool call execution.
Sourcepub fn record_llm_call(&self, trace: LlmCallTrace)
pub fn record_llm_call(&self, trace: LlmCallTrace)
Record an LLM inference call.
Sourcepub fn record_step(&self, trace: StepTrace)
pub fn record_step(&self, trace: StepTrace)
Record a ReACT step.
Sourcepub fn set_memory_context(&self, ctx: String)
pub fn set_memory_context(&self, ctx: String)
Set the memory context that was loaded for this execution.
Sourcepub fn finalize(&self, response: String) -> FinalizedTrace
pub fn finalize(&self, response: String) -> FinalizedTrace
Consume the trace and produce an immutable finalized snapshot.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ExecutionTrace
impl RefUnwindSafe for ExecutionTrace
impl Send for ExecutionTrace
impl Sync for ExecutionTrace
impl Unpin for ExecutionTrace
impl UnsafeUnpin for ExecutionTrace
impl UnwindSafe for ExecutionTrace
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