共用方式為


IMetricsBuilder Interface

Definition

Represents a type used to configure the metrics system by registering IMetricsListeners and using rules to determine which metrics are enabled.

public interface class IMetricsBuilder
public interface IMetricsBuilder
type IMetricsBuilder = interface
Public Interface IMetricsBuilder

Properties

Services

The application IServiceCollection. This is used by extension methods to register services.

Extension Methods

AddConfiguration(IMetricsBuilder, IConfiguration)

Reads metrics configuration from the provided IConfiguration section and configures which Meter's, Instrument's, and IMetricsListener's are enabled.

AddDebugConsole(IMetricsBuilder)

Enables console output for metrics for debugging purposes. This is not recommended for production use.

AddListener(IMetricsBuilder, IMetricsListener)

Registers a new IMetricsListener instance.

AddListener<T>(IMetricsBuilder)

Registers a new IMetricsListener of type T.

ClearListeners(IMetricsBuilder)

Removes all IMetricsListener registrations from the dependency injection container.

DisableMetrics(IMetricsBuilder, String, String, String, MeterScope)

Disables a specified Instrument for the given Meter and IMetricsListener.

DisableMetrics(IMetricsBuilder, String)

Disables all Instrument's for the given meter, for all registered IMetricsListener's.

EnableMetrics(IMetricsBuilder, String, String, String, MeterScope)

Enables a specified Instrument for the given Meter and IMetricsListener.

EnableMetrics(IMetricsBuilder, String)

Enables all Instrument's for the given meter, for all registered IMetricsListener's.

Applies to