pub trait TraceRepository: Send + Sync {
// Required methods
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_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 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_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 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_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 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 get_stats<'life0, 'async_trait>(
&'life0 self,
tenant_id: TenantId,
) -> Pin<Box<dyn Future<Output = Result<StorageStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Repository for trace and span storage (analytical, high-volume data).
Dev/Lite: SQLite. Production: ClickHouse.
Required Methods§
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.