pub trait MetricSplit {
// Required method
fn split(&mut self, input: Metric) -> SplitIterator ⓘ;
}
Expand description
Splits a metric into potentially multiple metrics.
In some cases, a single metric may represent multiple fundamental metrics: an aggregated summary or histogram can represent a count, sum, and subtotals for a given measurement. These metrics may be able to be handled natively/directly in a sink, but in other cases, those fundamental metrics may need to be extracted and operated on individually.
This trait defines a simple interface for defining custom rules about what metrics to split and when to split them.
Required Methods§
sourcefn split(&mut self, input: Metric) -> SplitIterator ⓘ
fn split(&mut self, input: Metric) -> SplitIterator ⓘ
Attempts to split the metric.
The returned iterator will either return only the input metric if no splitting occurred, or all resulting metrics that were created as a result of the split.