System.Diagnostics.Metrics
Namespace with 11 public types
Classes
Counter`1
Represents 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 display counters using a rate (requests/sec), by default, but can also display a cumulative total.
Histogram`1
Represents a metrics Instrument that 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.
Structures
Measurement`1
Stores one observed metrics value and its associated tags. This type is used by an Observable instrument's Observe() method when reporting current measurements.
with the associated tags.
Abstract Classes
Instrument
Base class of all Metrics Instrument classes
Instrument`1
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.