DiagnosticListener
public class DiagnosticListener : DiagnosticSource, IObservable<KeyValuePair<string, object>>, IDisposable
Provides an implementation of the abstract DiagnosticSource class that represents a named place to which a source sends its information (events).
Gets the collection of listeners for this DiagnosticListener.
Gets the name of this DiagnosticListener.
Creates a new DiagnosticListener.
Disposes the NotificationListeners.
Determines whether there are any registered subscribers.
public virtual IDisposable Subscribe(IObserver<KeyValuePair<string, object>> observer, Predicate<string> isEnabled)
Adds a subscriber, and optionally filters events based on their name.
public virtual IDisposable Subscribe(IObserver<KeyValuePair<string, object>> observer, Func<string, object, object, bool> isEnabled)
Adds a subscriber, and optionally filters events based on their name and up to two context objects.
Adds a subscriber.
public virtual IDisposable Subscribe(IObserver<KeyValuePair<string, object>> observer, Func<string, object, object, bool> isEnabled, Action<Activity, object> onActivityImport = null, Action<Activity, object> onActivityExport = null)
Adds a subscriber, optionally filters events based on their name and up to two context objects, and specifies methods to call when providers import or export activites from outside the process.