<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.0-preview.3.24172.9" />

Instrument<T>

public abstract class Instrument<T> : Instrument where T : struct
The base class for all non-observable instruments.
protected Instrument(Meter meter, string name, string unit, string description)

Create the metrics instrument using the properties meter, name, description, and unit.

protected Instrument(Meter meter, string name, string unit, string description, IEnumerable<KeyValuePair<string, object>> tags)

protected void RecordMeasurement(T measurement)

Records a measurement by notifying all MeterListener objects that are listening to this instrument.

protected void RecordMeasurement(T measurement, ReadOnlySpan<KeyValuePair<string, object>> tags)

Records a measurement by notifying all MeterListener objects that are listening to this instrument.

protected void RecordMeasurement(T measurement, KeyValuePair<string, object> tag)

Records a measurement by notifying all MeterListener objects that are listening to this instrument.

protected void RecordMeasurement(T measurement, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2)

Records a measurement by notifying all MeterListener objects that are listening to this instrument.

protected void RecordMeasurement(T measurement, KeyValuePair<string, object> tag1, KeyValuePair<string, object> tag2, KeyValuePair<string, object> tag3)

Records a measurement by notifying all MeterListener objects that are listening to this instrument.

protected void RecordMeasurement(T measurement, ref TagList tagList)

Records a measurement by notifying all MeterListener objects that are listening to this instrument.