ActivityListenerBuilder Class
Definition
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.
Describes the user-configurable surface of an ActivityListener registered with an ITracingBuilder. The tracing infrastructure consumes the values set on the builder and constructs the underlying ActivityListener; subscription to ActivitySource instances is controlled entirely by the configuration-driven TracingRule set.
public ref class ActivityListenerBuilder sealed
public sealed class ActivityListenerBuilder
type ActivityListenerBuilder = class
Public NotInheritable Class ActivityListenerBuilder
- Inheritance
-
ActivityListenerBuilder
Remarks
The builder intentionally does not expose ShouldListenTo, RefreshSources() or Dispose(): subscription filtering is owned by the rule set, and the lifetime of the underlying listener is owned by the tracing builder. The delegate properties are snapshotted by the infrastructure at registration time; mutating the builder afterwards has no effect on the registered listener. Instances are constructed by the tracing infrastructure when an AddListener overload runs; user code configures an instance through the configure callback passed to AddListener.
Properties
| Name | Description |
|---|---|
| ActivityStarted |
Gets or sets the callback invoked when a sampled Activity starts. |
| ActivityStopped |
Gets or sets the callback invoked when a sampled Activity stops. |
| ExceptionRecorder |
Gets or sets the callback invoked when an exception is recorded on a sampled Activity. |
| Name |
Gets the name used by configuration-based filtering to target rules at this listener. |
| Sample |
Gets or sets the callback invoked when an Activity is sampled from an ActivityContext. |
| SampleUsingParentId |
Gets or sets the callback invoked when an Activity is sampled from a parent identifier string. |
Methods
| Name | Description |
|---|---|
| Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
| GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
| GetType() |
Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
| ToString() |
Returns a string that represents the current object. (Inherited from Object) |