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

Microsoft.ApplicationInsights.Metrics.MetricIdentifier

A metric identifier encapsulates all information required to uniquely identify a metric. A metric is identified by its name/id, its namespace and the names of its dimensions.
public const int MaxDimensionsCount = 10

@Max number of dimensions supported.

public static string DefaultMetricNamespace { get; set; }

Gets or sets the namespace used for metrics of no namespace was explicitly speified.

public int DimensionsCount { get; }

Gets the dimensionality of this metric.

public string MetricId { get; }

Gets the ID (name) of this metric.

public string MetricNamespace { get; }

Gets the namespace of this metric.

public MetricIdentifier(string metricId)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name, string dimension3Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name, string dimension3Name, string dimension4Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name, string dimension3Name, string dimension4Name, string dimension5Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name, string dimension3Name, string dimension4Name, string dimension5Name, string dimension6Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name, string dimension3Name, string dimension4Name, string dimension5Name, string dimension6Name, string dimension7Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name, string dimension3Name, string dimension4Name, string dimension5Name, string dimension6Name, string dimension7Name, string dimension8Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name, string dimension3Name, string dimension4Name, string dimension5Name, string dimension6Name, string dimension7Name, string dimension8Name, string dimension9Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, string dimension1Name, string dimension2Name, string dimension3Name, string dimension4Name, string dimension5Name, string dimension6Name, string dimension7Name, string dimension8Name, string dimension9Name, string dimension10Name)

Initializes a new metric identifier.

public MetricIdentifier(string metricNamespace, string metricId, IList<string> dimensionNames)

Initializes a new metric identifier.

public bool Equals(MetricIdentifier otherMetricIdentifier)

Determines whether the specified object is a MetricIdentifier that is equal to this MetricIdentifier based on the respective metric namespaces, metric IDs and the number and the names of dimensions.

public string GetDimensionName(int dimensionNumber)

Gets the name of a dimension identified by the specified 1-based dimension index. For zero-dimensional metrics, this method will always fail.

public IEnumerable<string> GetDimensionNames()

Get an enumeration of the dimension names contained in this identity. The enumeration will have DimensionsCount elements.