Trait opentelemetry::sdk::export::metrics::CheckpointSet[][src]

pub trait CheckpointSet: Debug {
    fn try_for_each(
        &mut self,
        export_selector: &dyn ExportKindFor,
        f: &mut dyn FnMut(&Record<'_>) -> Result<()>
    ) -> Result<()>; }
This is supported on crate feature metrics only.

CheckpointSet allows a controller to access a complete checkpoint of aggregated metrics from the Processor. This is passed to the Exporter which may then use try_for_each to iterate over the collection of aggregated metrics.

Required methods

fn try_for_each(
    &mut self,
    export_selector: &dyn ExportKindFor,
    f: &mut dyn FnMut(&Record<'_>) -> Result<()>
) -> Result<()>
[src]

This iterates over aggregated checkpoints for all metrics that were updated during the last collection period. Each aggregated checkpoint returned by the function parameter may return an error.

The ExportKindSelector argument is used to determine whether the Record is computed using delta or cumulative aggregation.

ForEach tolerates MetricsError::NoData silently, as this is expected from the Meter implementation. Any other kind of error will immediately halt and return the error to the caller.

Loading content...

Implementors

impl CheckpointSet for PullController[src]

fn try_for_each(
    &mut self,
    export_selector: &dyn ExportKindFor,
    f: &mut dyn FnMut(&Record<'_>) -> Result<()>
) -> Result<()>
[src]

Loading content...