pub trait MetricsStore {
// Required methods
fn update_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
metrics: RunMetrics,
) -> Pin<Box<dyn Future<Output = Result<(), MetricsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunMetrics>, MetricsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for a distributed workflow metrics store.
Implementations track per-run metrics such as completed, failed, and retried work items.
Required Methods§
Sourcefn update_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
metrics: RunMetrics,
) -> Pin<Box<dyn Future<Output = Result<(), MetricsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
metrics: RunMetrics,
) -> Pin<Box<dyn Future<Output = Result<(), MetricsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update the metrics for a workflow run.
Sourcefn get_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunMetrics>, MetricsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunMetrics>, MetricsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the metrics for a workflow run.