MeterListener Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The MeterListener is class used to listen to the metrics instrument measurements recording.
public ref class MeterListener sealed : IDisposable
public sealed class MeterListener : IDisposable
type MeterListener = class
interface IDisposable
Public NotInheritable Class MeterListener
Implements IDisposable
- Inheritance
-
MeterListener
- Implements
Meter |
Initializes a new instance of the MeterListener class. |
Instrument |
Gets or sets the callback to get notified when an instrument is published. |
Measurements |
Gets or sets the callback to get notified when the measurement is stopped on some instrument. This can happen when the Meter or the Listener is disposed or calling Dispose() on the listener. |
Disable |
Stops listening to a specific instrument measurement recording. |
Dispose() |
Disposes the listeners which will stop it from listening to any instrument. |
Enable |
Starts listening to a specific instrument measurement recording. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Record |
Calls all Observable instruments that the listener is listening to, and calls SetMeasurementEventCallback<T>(MeasurementCallback<T>) with every collected measurement. |
Set |
Sets a callback for a specific numeric type to get the measurement recording notification from all instruments which enabled listening and was created with the same specified numeric type. If a measurement of type T is recorded and a callback of type T is registered, that callback will be used. |
Start() |
Enables the listener to start listening to instruments measurement recording. |
To |
Returns a string that represents the current object. (Inherited from Object) |
Product | Versions |
---|---|
.NET | 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: