CloudMetrics

Trait CloudMetrics 

Source
pub trait CloudMetrics: Send + Sync {
    // Required method
    fn export_metrics<'life0, 'life1, 'async_trait>(
        &'life0 self,
        metrics: &'life1 [Metric],
    ) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn export_metric<'life0, 'life1, 'async_trait>(
        &'life0 self,
        metric: &'life1 Metric,
    ) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait { ... }
}
Expand description

Unified trait for cloud metrics export.

Required Methods§

Source

fn export_metrics<'life0, 'life1, 'async_trait>( &'life0 self, metrics: &'life1 [Metric], ) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Exports a batch of metrics to the cloud provider.

§Arguments
  • metrics - Slice of metrics to export
§Errors

Returns CloudError::MetricsExport if the export operation fails.

Provided Methods§

Source

fn export_metric<'life0, 'life1, 'async_trait>( &'life0 self, metric: &'life1 Metric, ) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Exports a single metric.

§Arguments
  • metric - The metric to export
§Errors

Returns CloudError::MetricsExport if the export operation fails.

Implementors§