pub struct TraceStore { /* private fields */ }Expand description
Persists structured traces to disk for replay, debugging, and metrics.
Implementations§
Source§impl TraceStore
impl TraceStore
Sourcepub fn save_trace(&self, trace: &TurnTrace) -> Result<PathBuf>
pub fn save_trace(&self, trace: &TurnTrace) -> Result<PathBuf>
Saves a turn trace as a JSONL line to the session trace file.
Returns the path to the trace file.
Sourcepub fn save_session_traces(
&self,
session_id: &str,
traces: &[TurnTrace],
) -> Result<PathBuf>
pub fn save_session_traces( &self, session_id: &str, traces: &[TurnTrace], ) -> Result<PathBuf>
Replaces the trace JSONL for a session with the provided traces.
Sourcepub fn load_session_traces(&self, session_id: &str) -> Vec<TurnTrace>
pub fn load_session_traces(&self, session_id: &str) -> Vec<TurnTrace>
Loads all turn traces for the given session.
Sourcepub fn list_sessions(&self) -> Vec<String>
pub fn list_sessions(&self) -> Vec<String>
Lists all session IDs with stored traces.
Trait Implementations§
Source§impl Clone for TraceStore
impl Clone for TraceStore
Source§fn clone(&self) -> TraceStore
fn clone(&self) -> TraceStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TraceStore
impl RefUnwindSafe for TraceStore
impl Send for TraceStore
impl Sync for TraceStore
impl Unpin for TraceStore
impl UnsafeUnpin for TraceStore
impl UnwindSafe for TraceStore
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