Condividi tramite


IMetricTelemetryPipeline.TrackAsync Method

Definition

Send a metric aggregate to the eventual destination.

public System.Threading.Tasks.Task TrackAsync (Microsoft.ApplicationInsights.Metrics.MetricAggregate metricAggregate, System.Threading.CancellationToken cancelToken);
abstract member TrackAsync : Microsoft.ApplicationInsights.Metrics.MetricAggregate * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function TrackAsync (metricAggregate As MetricAggregate, cancelToken As CancellationToken) As Task

Parameters

metricAggregate
MetricAggregate

The aggregate.

cancelToken
CancellationToken

Cancellation may or may not be supported by different destinations.

Returns

The task representing the Track operation.

Exceptions

The specified metricAggregate is null.

The runtime class of the specified metricAggregate does not match the telemetry destination type represented by this instance of IMetricTelemetryPipeline.

The specified cancelToken has had cancellation requested.

Applies to