pub fn apply_function(
function: AggregateFunction,
metrics: &[MetricRecord],
) -> Result<f64, Status>Expand description
Applies the aggregation function to a set of metrics.
This function implements metric-specific aggregation by operating directly on MetricRecord instances. It uses the appropriate running window value based on the aggregation function type.
§Arguments
function- The aggregation function to applymetrics- The set of metrics to aggregate
§Returns
The aggregated value as a float, or an error if the operation fails