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

Microsoft.ApplicationInsights.Metrics.MetricConfiguration

Encapsulates the configuration for a metric and its respective data time series.

Gets the configuration for how each series of this metric should be aggregated.

public int SeriesCountLimit { get; }

Gets how many data time series a metric can contain as a maximum. Once this limit is reached, calls to TrackValue(..), TryGetDataSeries(..) and similar that would normally result in new series will return false.

public MetricConfiguration(int seriesCountLimit, int valuesPerDimensionLimit, IMetricSeriesConfiguration seriesConfig)

Creates a new instance of MetricConfiguration.

public MetricConfiguration(int seriesCountLimit, IEnumerable<int> valuesPerDimensionLimits, IMetricSeriesConfiguration seriesConfig)

Creates a new instance of MetricConfiguration.

public virtual bool Equals(MetricConfiguration other)

Gets whether tho objects describe identical configuration.

public int GetValuesPerDimensionLimit(int dimensionNumber)

Gets the maximum number of distinct values for a dimension identified by the specified 1-based dimension index.