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
Initializes a new instance of the MeterListener class.
Gets or sets the callback to get notified when an instrument is published.
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.
Stops listening to a specific instrument measurement recording.
Disposes the listeners which will stop it from listening to any instrument.
Starts listening to a specific instrument measurement recording.
Determines whether the specified object is equal to the current object.(Inherited from Object)
Serves as the default hash function.(Inherited from Object)
Gets the Type of the current instance.(Inherited from Object)
Creates a shallow copy of the current Object.(Inherited from Object)
Calls all Observable instruments that the listener is listening to, and calls SetMeasurementEventCallback<T>(MeasurementCallback<T>) with every collected measurement.
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.
Enables the listener to start listening to instruments measurement recording.
Returns a string that represents the current object.(Inherited from Object)