Language

ITracingBuilder Interface

Definition

Configures the tracing system by registering ActivityListener instances and using rules to determine which ActivitySource and Activity instances are enabled.

public interface class ITracingBuilder
public interface ITracingBuilder
type ITracingBuilder = interface
Public Interface ITracingBuilder

Properties

Name Description
Services

Gets the application service collection that's used by extension methods to register services.

Extension Methods

Name Description
AddConfiguration(ITracingBuilder, IConfiguration)

Reads tracing configuration from the provided IConfiguration section and configures which ActivitySource and Activity instances are enabled.

AddListener(ITracingBuilder, String, Action<ActivityListenerBuilder>)

Registers a new ActivityListener identified by name and described by the supplied configure callback.

AddListener(ITracingBuilder, String, Action<IServiceProvider,ActivityListenerBuilder>)

Registers a new ActivityListener identified by name and described by the supplied configure callback, which also receives the resolved IServiceProvider.

ClearListeners(ITracingBuilder)

Removes all ActivityListenerBuilder registrations from the dependency injection container.

DisableTracing(ITracingBuilder, String, String, String, ActivitySourceScopes)

Disables all activities for the given source, operation, listener, and scopes.

EnableTracing(ITracingBuilder, String, String, String, ActivitySourceScopes)

Enables all activities for the given source, operation, listener, and scopes.

Applies to