diff --git a/AspireYouTubeSummariser.ServiceDefaults/AspireYouTubeSummariser.ServiceDefaults.csproj b/AspireYouTubeSummariser.ServiceDefaults/AspireYouTubeSummariser.ServiceDefaults.csproj index 00e0d1f..f6823f8 100644 --- a/AspireYouTubeSummariser.ServiceDefaults/AspireYouTubeSummariser.ServiceDefaults.csproj +++ b/AspireYouTubeSummariser.ServiceDefaults/AspireYouTubeSummariser.ServiceDefaults.csproj @@ -1,4 +1,4 @@ - + Library @@ -11,6 +11,7 @@ + diff --git a/AspireYouTubeSummariser.ServiceDefaults/Extensions.cs b/AspireYouTubeSummariser.ServiceDefaults/Extensions.cs index baa7549..8097fe2 100644 --- a/AspireYouTubeSummariser.ServiceDefaults/Extensions.cs +++ b/AspireYouTubeSummariser.ServiceDefaults/Extensions.cs @@ -1,11 +1,14 @@ using System.Net; +using Azure.Monitor.OpenTelemetry.AspNetCore; + using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Http.Resilience; using Microsoft.Extensions.Logging; + using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; @@ -116,8 +119,8 @@ private static IHostApplicationBuilder AddOpenTelemetryExporters(this IHostAppli // .WithMetrics(metrics => metrics.AddPrometheusExporter()); // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.Exporter package) - // builder.Services.AddOpenTelemetry() - // .UseAzureMonitor(); + builder.Services.AddOpenTelemetry() + .UseAzureMonitor(); return builder; }