From a4f3b401e6fa1a0acc3bf35c484d4cdf4ccf7c49 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 5 Nov 2022 13:48:46 -0700 Subject: [PATCH] Set the service name --- src/Services/Podcasts/Podcast.MinimalAPI/Program.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Services/Podcasts/Podcast.MinimalAPI/Program.cs b/src/Services/Podcasts/Podcast.MinimalAPI/Program.cs index 1841039..561b6e9 100644 --- a/src/Services/Podcasts/Podcast.MinimalAPI/Program.cs +++ b/src/Services/Podcasts/Podcast.MinimalAPI/Program.cs @@ -102,10 +102,12 @@ builder.Services.AddOpenTelemetryMetrics(metrics => builder.Logging.AddOpenTelemetry(logging => { - logging.AddAzureMonitorLogExporter(o => - { - o.ConnectionString = azureMonitorConnectionString; - }); + logging + .SetResourceBuilder(serviceResource) + .AddAzureMonitorLogExporter(o => + { + o.ConnectionString = azureMonitorConnectionString; + }); }); var app = builder.Build();