pub trait LockedProcessor {
    // Required method
    fn process(
        &mut self,
        accumulation: Accumulation<'_>
    ) -> Result<(), MetricsError>;
}
Available on crate feature metrics only.
Expand description

Metric data processor.

Locked processors are responsible gathering exported results from the SDK during collection, and deciding over which dimensions to group the exported data.

The process method is called during collection in a single-threaded context from the SDK, after the aggregator is checkpointed, allowing the processor to build the set of metrics currently being exported.

Required Methods§

source

fn process( &mut self, accumulation: Accumulation<'_> ) -> Result<(), MetricsError>

Process is called by the SDK once per internal record, passing the export Accumulation (a Descriptor, the corresponding attributes, and the checkpointed aggregator).

This call has no Context argument because it is expected to perform only computation. An SDK is not expected to call exporters from with Process, use a controller for that.

Implementors§