pub struct TraceRepository { /* private fields */ }Expand description
Query access to the trace, log and audit tables.
Implementations§
Source§impl TraceRepository
impl TraceRepository
pub async fn resolve_task_id( &self, partial_id: &str, ) -> Result<Option<String>, TraceError>
pub async fn fetch_task_info( &self, task_id: &TaskId, ) -> Result<TaskInfo, TraceError>
pub async fn fetch_user_input( &self, task_id: &TaskId, ) -> Result<Option<String>, TraceError>
pub async fn fetch_agent_response( &self, task_id: &TaskId, ) -> Result<Option<String>, TraceError>
pub async fn fetch_execution_steps( &self, task_id: &TaskId, ) -> Result<Vec<ExecutionStep>, TraceError>
pub async fn fetch_ai_requests( &self, task_id: &TaskId, ) -> Result<Vec<AiRequestInfo>, TraceError>
pub async fn fetch_system_prompt( &self, request_id: &AiRequestId, ) -> Result<Option<String>, TraceError>
pub async fn fetch_conversation_messages( &self, request_id: &AiRequestId, ) -> Result<Vec<ConversationMessage>, TraceError>
pub async fn fetch_ai_request_message_previews( &self, request_id: &AiRequestId, ) -> Result<Vec<ConversationMessage>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn find_ai_request_for_audit( &self, id: &str, ) -> Result<Option<AuditLookupResult>, TraceError>
pub async fn count_audit_messages( &self, request_id: &AiRequestId, ) -> Result<i64, TraceError>
pub async fn count_audit_tool_calls( &self, request_id: &AiRequestId, ) -> Result<i64, TraceError>
pub async fn list_audit_messages( &self, request_id: &AiRequestId, page: AuditPage, ) -> Result<Vec<ConversationMessage>, TraceError>
pub async fn list_audit_tool_calls( &self, request_id: &AiRequestId, page: AuditPage, ) -> Result<Vec<AuditToolCallRow>, TraceError>
pub async fn list_linked_mcp_calls( &self, request_id: &AiRequestId, ) -> Result<Vec<LinkedMcpCall>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn fetch_log_events( &self, trace_id: &TraceId, ) -> Result<Vec<TraceEvent>, TraceError>
pub async fn fetch_ai_request_summary( &self, trace_id: &TraceId, ) -> Result<AiRequestSummary, TraceError>
pub async fn fetch_ai_request_events( &self, trace_id: &TraceId, ) -> Result<Vec<TraceEvent>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn list_traces( &self, filter: &TraceListFilter, ) -> Result<Vec<TraceListItem>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn find_log_by_id( &self, id: &LogId, ) -> Result<Option<LogEntry>, TraceError>
pub async fn find_log_by_partial_id( &self, id_prefix: &str, ) -> Result<Option<LogEntry>, TraceError>
pub async fn find_logs_by_trace_id( &self, trace_id: &TraceId, ) -> Result<Vec<LogEntry>, TraceError>
pub async fn list_logs_filtered( &self, since: Option<DateTime<Utc>>, level: Option<LogLevel>, limit: i64, ) -> Result<Vec<LogEntry>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn search_logs( &self, pattern: &str, since: Option<DateTime<Utc>>, level: Option<LogLevel>, limit: i64, ) -> Result<Vec<LogSearchItem>, TraceError>
pub async fn search_tool_executions( &self, pattern: &str, since: Option<DateTime<Utc>>, limit: i64, ) -> Result<Vec<ToolExecutionItem>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn count_logs_by_level( &self, since: Option<DateTime<Utc>>, ) -> Result<Vec<LevelCount>, TraceError>
pub async fn top_modules( &self, since: Option<DateTime<Utc>>, limit: i64, ) -> Result<Vec<ModuleCount>, TraceError>
pub async fn log_time_range( &self, since: Option<DateTime<Utc>>, ) -> Result<LogTimeRange, TraceError>
pub async fn total_log_count(&self) -> Result<i64, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn fetch_mcp_executions( &self, task_id: &TaskId, context_id: &ContextId, ) -> Result<Vec<McpToolExecution>, TraceError>
pub async fn fetch_mcp_linked_ai_requests( &self, mcp_execution_id: &McpExecutionId, ) -> Result<Vec<AiRequestInfo>, TraceError>
pub async fn fetch_tool_logs( &self, task_id: &TaskId, context_id: &ContextId, ) -> Result<Vec<ToolLogEntry>, TraceError>
pub async fn fetch_task_artifacts( &self, task_id: &TaskId, context_id: &ContextId, ) -> Result<Vec<TaskArtifact>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn list_ai_requests( &self, filter: &AiRequestFilter, ) -> Result<Vec<AiRequestListItem>, TraceError>
pub async fn find_ai_request_detail( &self, id: &str, ) -> Result<Option<AiRequestDetail>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn get_ai_request_stats( &self, since: Option<DateTime<Utc>>, ) -> Result<AiRequestStats, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn fetch_mcp_execution_summary( &self, trace_id: &TraceId, ) -> Result<McpExecutionSummary, TraceError>
pub async fn fetch_mcp_execution_events( &self, trace_id: &TraceId, ) -> Result<Vec<TraceEvent>, TraceError>
pub async fn fetch_task_id_for_trace( &self, trace_id: &TraceId, ) -> Result<Option<String>, TraceError>
pub async fn fetch_execution_step_summary( &self, trace_id: &TraceId, ) -> Result<ExecutionStepSummary, TraceError>
pub async fn fetch_execution_step_events( &self, trace_id: &TraceId, ) -> Result<Vec<TraceEvent>, TraceError>
Source§impl TraceRepository
impl TraceRepository
pub async fn list_tool_executions( &self, filter: &ToolExecutionFilter, ) -> Result<Vec<ToolExecutionItem>, TraceError>
Trait Implementations§
Source§impl Clone for TraceRepository
impl Clone for TraceRepository
Auto Trait Implementations§
impl !RefUnwindSafe for TraceRepository
impl !UnwindSafe for TraceRepository
impl Freeze for TraceRepository
impl Send for TraceRepository
impl Sync for TraceRepository
impl Unpin for TraceRepository
impl UnsafeUnpin for TraceRepository
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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