แชร์ผ่าน


MetricCollector<T> Class

Definition

Collects the measurements published from an Instrument<T> or ObservableInstrument<T>.

generic <typename T>
 where T : value classpublic ref class MetricCollector sealed : IDisposable
public sealed class MetricCollector<T> : IDisposable where T : struct
type MetricCollector<'T (requires 'T : struct)> = class
    interface IDisposable
Public NotInheritable Class MetricCollector(Of T)
Implements IDisposable

Type Parameters

T

The type of metric data being recorded.

Inheritance
MetricCollector<T>
Implements

Constructors

MetricCollector<T>(Instrument<T>, TimeProvider)

Initializes a new instance of the MetricCollector<T> class.

MetricCollector<T>(Meter, String, TimeProvider)

Initializes a new instance of the MetricCollector<T> class.

MetricCollector<T>(Object, String, String, TimeProvider)

Initializes a new instance of the MetricCollector<T> class.

MetricCollector<T>(ObservableInstrument<T>, TimeProvider)

Initializes a new instance of the MetricCollector<T> class.

Properties

Instrument

Gets the Instrument that is being recorded.

LastMeasurement

Gets the latest measurement collected, if any.

Methods

Clear()

Removes all accumulated measurements from the collector.

Dispose()

Disposes the MetricCollector<T> and stops recording measurements.

GetMeasurementSnapshot(Boolean)

Gets a snapshot of measurements collected by this collector.

RecordObservableInstruments()

Scan all registered observable instruments.

WaitForMeasurementsAsync(Int32, CancellationToken)

Returns a task that completes when the collector has collected a minimum number of measurements.

WaitForMeasurementsAsync(Int32, TimeSpan)

Returns a task that completes when the collector has collected a minimum number of measurements.

Applies to