Condividi tramite


TelemetryClientExtensions.GetMetricManager Method

Definition

Gets the MetricManager for this TelemetryClient at the specified scope. If a metric manager does not exist at the specified scope, it is created.

public static Microsoft.ApplicationInsights.Metrics.MetricManager GetMetricManager (this Microsoft.ApplicationInsights.TelemetryClient telemetryClient, Microsoft.ApplicationInsights.MetricAggregationScope aggregationScope);
static member GetMetricManager : Microsoft.ApplicationInsights.TelemetryClient * Microsoft.ApplicationInsights.MetricAggregationScope -> Microsoft.ApplicationInsights.Metrics.MetricManager
<Extension()>
Public Function GetMetricManager (telemetryClient As TelemetryClient, aggregationScope As MetricAggregationScope) As MetricManager

Parameters

telemetryClient
TelemetryClient

The telemetry client for which to get the metric manager.

aggregationScope
MetricAggregationScope

If MetricAggregationScope.TelemetryClient is specified, the metric manager specific to this client is returned. Such manager aggregates metrics for this client object only. Two metrics with exactly the same id, namespace and dimensions would be aggregated separately for different telemetry client objects when this scope is used.
If MetricAggregationScope.TelemetryConfiguration is specified, the metric manager for the telemetry configuration of this client is returned. Such manager aggregates metrics for all clients that use that telemetry configuration. Two metrics with exactly the same id, namespace and dimensions would be aggregated together for different telemetry client objects that use the same telemetry configuration when this scope is used.

Returns

The metric manager for this telemetry client at the specified scope.

Applies to