Skip to content

[FEATURE REQ] Add AddAzureMonitorLogExporter extension method on LoggerProviderBuilder  #44464

@joegoldman2

Description

@joegoldman2

Library name

Azure.Monitor.OpenTelemetry.Exporter

Please describe the feature.

Summary

Following open-telemetry/opentelemetry-dotnet#5648, I think Azure.Monitor.OpenTelemetry.Exporter should provide a new extension method to configure the Azure Monitor log exporter on LoggerProviderBuilder (in the same way that AddAzureMonitorTraceExporter exists on TracerProviderBuilder and AddAzureMonitorMetricExporter exists for MeterProviderBuilder).

API Proposal

namespace Azure.Monitor.OpenTelemetry.Exporter
{
    public static class AzureMonitorExporterExtensions
    {
+        public static LoggerProviderBuilder AddAzureMonitorLogExporter(
+            this LoggerProviderBuilder builder,
+            Action<AzureMonitorExporterOptions> configure = null,
+            TokenCredential credential = null)
    }
}

In a second phase, once this new API is available, perhaps OpenTelemetryLoggerOptions.AddAzureMonitorLogExporter should be deprecated.

cc @CodeBlanch, @lmolkova

Metadata

Metadata

Assignees

Labels

ClientThis issue is related to a non-management packageMonitor - ExporterMonitor OpenTelemetry ExporterService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions