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

Microsoft.ApplicationInsights.Metrics.Extensibility.IMetricValueFilter

public interface IMetricValueFilter
Abstraction for a filter that can controll whether values are being tracked or ignored by a metric aggregator.
bool WillConsume(MetricSeries dataSeries, double metricValue)

Determine whether a value will be tracked or ignored while aggregating a metric data time series.

bool WillConsume(MetricSeries dataSeries, object metricValue)

Determine whether a value will be tracked or ignored while aggregating a metric data time series.