System.Diagnostics.Metrics
Namespace with 13 public types
Classes
Counter`1
The counter is an instrument that supports adding non-negative values. For example you might call
counter.Add(1) each time a request is processed to track the total number of requests. Most metric viewers
will display counters using a rate by default (requests/sec) but can also display a cumulative total.
Histogram`1
The histogram is a metrics Instrument which can be used to report arbitrary values that are likely to be statistically meaningful.
e.g. the request duration.
Use method to create the Histogram object.
Meter
Meter is the class responsible for creating and tracking the Instruments.
MeterListener
MeterListener is class used to listen to the metrics instrument measurements recording.
ObservableCounter`1
ObservableCounter is a metrics observable Instrument which reports monotonically increasing value(s) when the instrument is being observed.
e.g. CPU time (for different processes, threads, user mode or kernel mode).
Use Meter.CreateObservableCounter methods to create the observable counter object.
ObservableGauge`1
ObservableGauge is an observable Instrument that reports non-additive value(s) when the instrument is being observed.
e.g. the current room temperature
Use Meter.CreateObservableGauge methods to create the observable counter object.
ObservableUpDownCounter`1
ObservableUpDownCounter is a metrics observable Instrument which reports increasing or decreasing value(s) when the instrument is being observed.
e.g. the process heap size or the approximate number of items in a lock-free circular buffer.
Use Meter.CreateObservableUpDownCounter methods to create an ObservableUpDownCounter object.
UpDownCounter`1
The UpDownCounter is an instrument that supports reporting positive or negative metric values.
UpDownCounter may be used in scenarios like reporting the change in active requests or queue size.
Structures
Measurement`1
Measurement stores one observed metrics value and its associated tags. This type is used by Observable instruments' Observe() method when reporting current measurements.
with the associated tags.
Abstract Classes
Instrument
Base class of all Metrics Instrument classes
Instrument`1
Instrument{T} is the base class for all non-observable instruments.
ObservableInstrument`1
ObservableInstrument{T} is the base class from which all metrics observable instruments will inherit from.