<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />

Microsoft.ApplicationInsights.Metrics.Extensibility.IMetricSeriesAggregator

public interface IMetricSeriesAggregator
The abstraction for a metric aggregator. An aggregator is a data processing type that inspects all values tracked for a metric series across an aggregation period and creates an aggregate that summarizes the period when it is completed. The most common aggregator is the MeasurementAggregator, which produces aggregates that contain the Min, Max, Sum and Count of values tracked over the aggregation time period.

Gets the data series aggregated by this aggregator.

Wraps up the ongping aggregation period and procudes the resulting aggregate.

Creates the aggregate for the ongoing aggregation period without completing the period. May not be thread safe.

void Reset(DateTimeOffset periodStart, IMetricValueFilter valueFilter)

Resets this aggregator and prepares it for a new aggregation period.

void Reset(DateTimeOffset periodStart)

Resets this aggregator and prepares it for a new aggregation period.

void TrackValue(double metricValue)

Adds a value to the aggregation.

void TrackValue(object metricValue)

Adds a value to the aggregation.

bool TryRecycle()

Attempts to reset this aggregator so it ban be reused for a new aggregation period.