System.Diagnostics.Metrics
Namespace with 13 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, for example, the request duration. Call to create a Histogram object.
Meter
Meter is the class responsible for creating and tracking the Instruments.
MeterListener
The MeterListener is class used to listen to the metrics instrument measurements recording.
ObservableCounter`1
Represents a metrics-observable instrument that reports monotonically increasing values when the instrument is being observed, for example, CPU time (for different processes, threads, user mode, or kernel mode). Call to create the observable counter object.
ObservableGauge`1
Represents an observable instrument that reports non-additive values when the instrument is being observed, for example, the current room temperature. Call to create the observable counter object.
ObservableUpDownCounter`1
A metrics-observable instrument that reports increasing or decreasing values when the instrument is being observed.
Use this instrument to monitor the process heap size or the approximate number of items in a lock-free circular buffer, for example.
To create an ObservableUpDownCounter object, use the methods.
UpDownCounter`1
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
Stores one observed metrics value and its associated tags. This type is used by an Observable instrument's Observe() method when reporting current measurements.
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.