Udostępnij za pośrednictwem


AzureMonitorExporterExtensions.AddAzureMonitorTraceExporter Method

Definition

Adds Azure Monitor Trace exporter to the TracerProvider.

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

Parameters

builder
OpenTelemetry.Trace.TracerProviderBuilder

OpenTelemetry.Trace.TracerProviderBuilder builder to use.

configure
Action<AzureMonitorExporterOptions>

Callback action for configuring AzureMonitorExporterOptions.

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.Trace.TracerProviderBuilder

The instance of OpenTelemetry.Trace.TracerProviderBuilder to chain the calls.

Applies to