Microsoft.ApplicationInsights.Metrics.Extensibility.MemoryMetricTelemetryPipeline
class MemoryMetricTelemetryPipeline : IMetricTelemetryPipeline, IReadOnlyList<MetricAggregate>, IEnumerable<MetricAggregate>, IEnumerable, IReadOnlyCollection<MetricAggregate>
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.
Default setting for how many items to hold in memory.
Gets the current number of metric aggregates in the buffer.
Gets the max buffer size.
Provides access to the metric aggregates that have been written to this pipeline.
public MemoryMetricTelemetryPipeline()
Creates a new MemoryMetricTelemetryPipeline that holds up to CountLimitDefault aggregates in memory.
Creates a new MemoryMetricTelemetryPipeline that holds up to the specified number of aggregates in memory.
Clears the buffer.
No-op.
Stores a metric aggregate in a memory buffer. The aggregate is not further processed,
but it can be accessed from the buffer. If the buffer already contains CountLimit items,
the oldest item (the one at index 0) gets discarded before adding the new item at the end of the buffer.