Condividi tramite


AzureMonitorExporterExtensions.AddAzureMonitorLogExporter Method

Definition

Overloads

AddAzureMonitorLogExporter(OpenTelemetryLoggerOptions, Action<AzureMonitorExporterOptions>, TokenCredential)

Adds Azure Monitor Log Exporter with OpenTelemetryLoggerOptions.

AddAzureMonitorLogExporter(LoggerProviderBuilder, Action<AzureMonitorExporterOptions>, TokenCredential, String)

Adds Azure Monitor Log Exporter to the LoggerProvider.

AddAzureMonitorLogExporter(OpenTelemetryLoggerOptions, Action<AzureMonitorExporterOptions>, TokenCredential)

Source:
AzureMonitorExporterExtensions.cs
Source:
AzureMonitorExporterExtensions.cs

Adds Azure Monitor Log Exporter with OpenTelemetryLoggerOptions.

public static OpenTelemetry.Logs.OpenTelemetryLoggerOptions AddAzureMonitorLogExporter (this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, Action<Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions> configure = default, Azure.Core.TokenCredential credential = default);
static member AddAzureMonitorLogExporter : OpenTelemetry.Logs.OpenTelemetryLoggerOptions * Action<Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions> * Azure.Core.TokenCredential -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions
<Extension()>
Public Function AddAzureMonitorLogExporter (loggerOptions As OpenTelemetryLoggerOptions, Optional configure As Action(Of AzureMonitorExporterOptions) = Nothing, Optional credential As TokenCredential = Nothing) As OpenTelemetryLoggerOptions

Parameters

loggerOptions
OpenTelemetry.Logs.OpenTelemetryLoggerOptions

OpenTelemetry.Logs.OpenTelemetryLoggerOptions options 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.

Returns

OpenTelemetry.Logs.OpenTelemetryLoggerOptions

The instance of OpenTelemetry.Logs.OpenTelemetryLoggerOptions to chain the calls.

Applies to

AddAzureMonitorLogExporter(LoggerProviderBuilder, Action<AzureMonitorExporterOptions>, TokenCredential, String)

Source:
AzureMonitorExporterExtensions.cs

Adds Azure Monitor Log Exporter to the LoggerProvider.

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

Parameters

builder
OpenTelemetry.Logs.LoggerProviderBuilder

OpenTelemetry.Logs.LoggerProviderBuilder builder to use.

configure
Action<AzureMonitorExporterOptions>

Optional 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

Optional name which is used when retrieving options.

Returns

OpenTelemetry.Logs.LoggerProviderBuilder

The instance of OpenTelemetry.Logs.LoggerProviderBuilder to chain the calls.

Applies to