pub struct SqliteTraceRepository { /* private fields */ }Expand description
SQLite-backed trace repository.
Stores trace metadata in a traces table and individual spans in a spans
table with proper indexes for efficient querying by tenant, time range,
provider, model, and security score.
Implementations§
Trait Implementations§
Source§impl TraceRepository for SqliteTraceRepository
impl TraceRepository for SqliteTraceRepository
Source§fn store_trace<'life0, 'life1, 'async_trait>(
&'life0 self,
trace: &'life1 TraceEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_trace<'life0, 'life1, 'async_trait>(
&'life0 self,
trace: &'life1 TraceEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store a trace event with all its spans.
Source§fn store_span<'life0, 'life1, 'async_trait>(
&'life0 self,
span: &'life1 TraceSpan,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_span<'life0, 'life1, 'async_trait>(
&'life0 self,
span: &'life1 TraceSpan,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store a single trace span.
Source§fn query_traces<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 TraceQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_traces<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 TraceQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query traces with filters.
Source§fn query_spans<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 TraceQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceSpan>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_spans<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 TraceQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<TraceSpan>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query spans with filters.
Source§fn get_trace<'life0, 'async_trait>(
&'life0 self,
tenant_id: TenantId,
trace_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<TraceEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_trace<'life0, 'async_trait>(
&'life0 self,
tenant_id: TenantId,
trace_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<TraceEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a specific trace by ID.
Source§fn get_span<'life0, 'async_trait>(
&'life0 self,
tenant_id: TenantId,
span_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<TraceSpan>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_span<'life0, 'async_trait>(
&'life0 self,
tenant_id: TenantId,
span_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<TraceSpan>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a specific span by ID.
Source§fn delete_traces_before<'life0, 'async_trait>(
&'life0 self,
tenant_id: TenantId,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_traces_before<'life0, 'async_trait>(
&'life0 self,
tenant_id: TenantId,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete traces older than the specified time.
Auto Trait Implementations§
impl Freeze for SqliteTraceRepository
impl !RefUnwindSafe for SqliteTraceRepository
impl Send for SqliteTraceRepository
impl Sync for SqliteTraceRepository
impl Unpin for SqliteTraceRepository
impl UnsafeUnpin for SqliteTraceRepository
impl !UnwindSafe for SqliteTraceRepository
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