AzureMonitorExporterExtensions.AddAzureMonitorMetricExporter Method

Definition

Adds Azure Monitor Metric exporter.

public static OpenTelemetry.Metrics.MeterProviderBuilder AddAzureMonitorMetricExporter (this OpenTelemetry.Metrics.MeterProviderBuilder builder, Action<Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions> configure = default, Azure.Core.TokenCredential credential = default, string name = default);
static member AddAzureMonitorMetricExporter : OpenTelemetry.Metrics.MeterProviderBuilder * Action<Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions> * Azure.Core.TokenCredential * string -> OpenTelemetry.Metrics.MeterProviderBuilder
<Extension()>
Public Function AddAzureMonitorMetricExporter (builder As MeterProviderBuilder, Optional configure As Action(Of AzureMonitorExporterOptions) = Nothing, Optional credential As TokenCredential = Nothing, Optional name As String = Nothing) As MeterProviderBuilder

Parameters

builder
OpenTelemetry.Metrics.MeterProviderBuilder

OpenTelemetry.Metrics.MeterProviderBuilder builder to use.

configure
Action<AzureMonitorExporterOptions>

Exporter configuration options.

credential
TokenCredential

An Azure TokenCredential capable of providing an OAuth token. Note: if a credential is provided to both AzureMonitorExporterOptions and this parameter, the Options will take precedence.

name
String

Name which is used when retrieving options.

Returns

OpenTelemetry.Metrics.MeterProviderBuilder

The instance of OpenTelemetry.Metrics.MeterProviderBuilder to chain the calls.

Applies to