Sdílet prostřednictvím


Metric Class

Definition

Represents a zero- or multi-dimensional metric.
Contains convenience methods to track, aggregate and send values.
A Metric instance groups one or more MetricSeries that actually track and aggregate values along with naming and configuration attributes that identify the metric and define how it will be aggregated.

public sealed class Metric
type Metric = class
Public NotInheritable Class Metric
Inheritance
Metric

Properties

Identifier

Gets the identifier of a metric groups together the MetricNamespace, the MetricId, and the dimensions of the metric, if any.

SeriesCount

Gets the current number of metric series contained in this metric. Each metric contains a special zero-dimension series, plus one series per unique dimension-values combination.

Methods

GetAllSeries()

Gets all metric series contained in this metric. Each metric contains a special zero-dimension series, plus one series per unique dimension-values combination.

GetDimensionValues(Int32)

Gets the values known for dimension identified by the specified 1-based dimension index.

TrackValue(Double, String, String, String, String, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 10-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String, String, String, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 9-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String, String, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 8-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 7-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 6-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 5-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 4-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 3-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 2-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double, String)

Tracks the specified value using the MetricSeries associated with the specified dimension value.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 1-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Double)

Tracks the specified value.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period.
This method uses the zero-dimensional MetricSeries associated with this metric. Use TrackValue(..) to track values into MetricSeries associated with specific dimension-values in multi-dimensional metrics.

TrackValue(Object, String, String, String, String, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 10-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String, String, String, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 9-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String, String, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 8-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 7-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 6-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 5-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 4-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 3-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String, String)

Tracks the specified value using the MetricSeries associated with the specified dimension values.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 2-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object, String)

Tracks the specified value using the MetricSeries associated with the specified dimension value.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period. This overload may only be used with 1-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TrackValue(Object)

Tracks the specified value.
An aggregate representing tracked values will be automatically sent to the cloud ingestion endpoint at the end of each aggregation period.
This method uses the zero-dimensional MetricSeries associated with this metric. Use TrackValue(..) to track values into MetricSeries associated with specific dimension-values in multi-dimensional metrics.

TryGetDataSeries(MetricSeries, Boolean, String[])

Gets or creates the MetricSeries associated with the specified dimension values.
This overload used metrics of any valid dimensionality: The number of elements in the specified dimensionValues array must exactly match the dimensionality of this metric, and that array may not contain nulls. Specify a null-array for zero-dimensional metrics.

TryGetDataSeries(MetricSeries, String, String, String, String, String, String, String, String, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 10-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String, String, String, String, String, String, String, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 9-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String, String, String, String, String, String, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 8-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String, String, String, String, String, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 7-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String, String, String, String, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 6-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String, String, String, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 5-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String, String, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 4-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 3-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String, String)

Gets or creates the MetricSeries associated with the specified dimension values.
This overload may only be used with 2-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries, String)

Gets or creates the MetricSeries associated with the specified dimension value.
This overload may only be used with 1-dimensional metrics. Use other overloads to specify a matching number of dimension values for this metric.

TryGetDataSeries(MetricSeries)

Gets a MetricSeries associated with this metric.
This overload gets the zero-dimensional MetricSeries associated with this metric. Every metric, regardless of its dimensionality, has such a zero-dimensional MetricSeries.

Extension Methods

GetConfiguration(Metric)

Exposes the Configuration property for users who imported the Microsoft.ApplicationInsights.Metrics.Extensibility namespace.

Applies to