Trait opentelemetry::sdk::export::metrics::Subtractor
source · [−]pub trait Subtractor {
fn subtract(
&self,
operand: &(dyn Aggregator + Send + Sync),
result: &(dyn Aggregator + Send + Sync),
descriptor: &Descriptor
) -> Result<()>;
}
This is supported on crate feature
metrics
only.Expand description
An optional interface implemented by some Aggregators. An Aggregator must
support subtract()
in order to be configured for a Precomputed-Sum
instrument (SumObserver, UpDownSumObserver) using a DeltaExporter.
Required methods
fn subtract(
&self,
operand: &(dyn Aggregator + Send + Sync),
result: &(dyn Aggregator + Send + Sync),
descriptor: &Descriptor
) -> Result<()>
fn subtract(
&self,
operand: &(dyn Aggregator + Send + Sync),
result: &(dyn Aggregator + Send + Sync),
descriptor: &Descriptor
) -> Result<()>
Subtract subtracts the operand
from this Aggregator and outputs the value
in result
.