From 3ca644444f5219e4c4887f58d1b0fa41028c81fc Mon Sep 17 00:00:00 2001 From: Amadeusz Sadowski Date: Wed, 18 Oct 2023 17:16:53 +0200 Subject: [PATCH] fix(monitor): remove newing-up unused object in UseAzureMonitor fixes #38787 --- .../src/OpenTelemetryBuilderExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/OpenTelemetryBuilderExtensions.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/OpenTelemetryBuilderExtensions.cs index fd14995de3c60..629d4041dd724 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/OpenTelemetryBuilderExtensions.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/OpenTelemetryBuilderExtensions.cs @@ -53,7 +53,7 @@ public static OpenTelemetryBuilder UseAzureMonitor(this OpenTelemetryBuilder bui { builder.Services.TryAddSingleton, DefaultAzureMonitorOptions>(); - return builder.UseAzureMonitor(o => o = new AzureMonitorOptions()); + return builder.UseAzureMonitor(o => { }); } ///