Table of Contents

Class MeterProviderBuilder

Namespace
OpenTelemetry.Metrics
Assembly
OpenTelemetry.Api.dll

MeterProviderBuilder base class.

public abstract class MeterProviderBuilder
Inheritance
MeterProviderBuilder
Inherited Members

Constructors

MeterProviderBuilder()

Initializes a new instance of the MeterProviderBuilder class.

protected MeterProviderBuilder()

Methods

AddInstrumentation<TInstrumentation>(Func<TInstrumentation>)

Adds instrumentation to the provider.

public abstract MeterProviderBuilder AddInstrumentation<TInstrumentation>(Func<TInstrumentation> instrumentationFactory) where TInstrumentation : class

Parameters

instrumentationFactory Func<TInstrumentation>

Function that builds instrumentation.

Returns

MeterProviderBuilder

Returns MeterProviderBuilder for chaining.

Type Parameters

TInstrumentation

Type of instrumentation class.

AddMeter(params string[])

Adds given Meter names to the list of subscribed meters.

public abstract MeterProviderBuilder AddMeter(params string[] names)

Parameters

names string[]

Meter names.

Returns

MeterProviderBuilder

Returns MeterProviderBuilder for chaining.