Trait opentelemetry::sdk::export::metrics::LockedCheckpointer
source · [−]pub trait LockedCheckpointer {
fn processor(&mut self) -> &mut dyn LockedProcessor;
fn reader(&mut self) -> &mut dyn Reader;
fn start_collection(&mut self);
fn finish_collection(&mut self) -> Result<(), MetricsError>;
}
Available on crate feature
metrics
only.Expand description
The interface used by a controller to coordinate the processor with accumulator(s) and exporter(s).
The StartCollection() and FinishCollection() methods start and finish a collection interval. Controllers call the Accumulator(s) during collection to process Accumulations.
Required Methods
sourcefn processor(&mut self) -> &mut dyn LockedProcessor
fn processor(&mut self) -> &mut dyn LockedProcessor
Processes metric data for export.
The process
method is bracketed by start_collection
and
finish_collection
calls.
Reader returns the current data set.
This may be called before and after collection. The implementation is required to return the same value throughout its lifetime.
sourcefn start_collection(&mut self)
fn start_collection(&mut self)
begins a collection interval.
sourcefn finish_collection(&mut self) -> Result<(), MetricsError>
fn finish_collection(&mut self) -> Result<(), MetricsError>
ends a collection interval.