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

Microsoft.ApplicationInsights.Metrics.Extensibility.IMetricTelemetryPipeline

public interface IMetricTelemetryPipeline
Represents an eventual destination for metric telemetry. For example, an Application Insights telemetry pipeline, a file or some other ingestion point.

Flushes the telemetry pipeline in case it had cached any data.

Task TrackAsync(MetricAggregate metricAggregate, CancellationToken cancelToken)

Send a metric aggregate to the eventual destination.