Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Diagnostics.​ActivityListener

Assembly: System.Diagnostics.DiagnosticSource

Inheritance: object → ActivityListener

Implemented Interfaces

Allows listening to the start and stop activity events and gives the opportunity to decide creating an activity for sampling scenarios.

Properties

public Action<​Activity>
ActivityStarted
Gets or sets the callback used to listen to the activity start event.
public Action<​Activity>
ActivityStopped
Gets or sets the callback used to listen to the activity stop event.
ExceptionRecorder
Gets or sets the callback used to listen to <see cref="T:System.Diagnostics.Activity" /> events when exceptions are added.
public Func<​ActivitySource, bool>
ShouldListenTo
Gets or sets the callback that allows deciding if activity object events that were created using the activity source object should be listened or not.
public SampleActivity<​string>
SampleUsingParentId
Gets or sets the callback that is used to decide if creating <see cref="T:System.Diagnostics.Activity" /> objects with a specific data state is allowed.
Sample
Gets or sets the callback that is used to decide if creating <see cref="T:System.Diagnostics.Activity" /> objects with a specific data state is allowed.

Methods

public void
Dispose​()
Unregisters this activity listener object from listening to activity events.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object