Microsoft.ApplicationInsights.Metrics.Extensibility.MemoryMetricTelemetryPipeline
class MemoryMetricTelemetryPipeline : IMetricTelemetryPipeline, IReadOnlyList<MetricAggregate>, IReadOnlyCollection<MetricAggregate>, IEnumerable<MetricAggregate>, IEnumerable
A IMetricTelemetryPipeline that holds aggregates in memory instead of sending them anywhere for processing.
This is useful for local testing and debugging scenarios.
An instance of this class holds up to CountLimit aggregates in memory. WHen additional aggregates are written,
the oldest ones get discarded.
namespace Microsoft.ApplicationInsights.Metrics.Extensibility
{
internal class MemoryMetricTelemetryPipeline : IMetricTelemetryPipeline, IReadOnlyList<MetricAggregate>, IReadOnlyCollection<MetricAggregate>, IEnumerable<MetricAggregate>, IEnumerable
{
public const int CountLimitDefault = 1000;
public int CountLimit { get; }
public int Count { get; }
public MetricAggregate this[int index] { get; }
public MemoryMetricTelemetryPipeline();
public MemoryMetricTelemetryPipeline(int countLimit);
public void Clear();
public Task TrackAsync(MetricAggregate metricAggregate, CancellationToken cancelToken);
public Task FlushAsync(CancellationToken cancelToken);
}
}