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

pub trait Checkpointer: LockedProcessor {
    fn checkpoint_set(&mut self) -> &mut dyn CheckpointSet;
fn start_collection(&mut self);
fn finish_collection(&mut self) -> Result<()>; }
This is supported on crate feature metrics only.

The interface used by a Controller to coordinate the Processor with Accumulator(s) and Exporter(s). The start_collection and finish_collection methods start and finish a collection interval. Controllers call the Accumulator(s) during collection to process Accumulations.

Required methods

fn checkpoint_set(&mut self) -> &mut dyn CheckpointSet[src]

A checkpoint of the current data set. This may be called before and after collection. The implementation is required to return the same value throughout its lifetime.

fn start_collection(&mut self)[src]

Logic to be run at the start of a collection interval.

fn finish_collection(&mut self) -> Result<()>[src]

Cleanup logic or other behavior that needs to be run after a collection interval is complete.

Loading content...

Implementors

Loading content...