Skip to content

Commit

Permalink
refactor: Add Microsoft.SemanticKernel* meter sources
Browse files Browse the repository at this point in the history
Update the Extensions.cs file in the BookWorm.ServiceDefaults project. Add the "Microsoft.SemanticKernel*" meter sources to the OpenTelemetry configuration.
  • Loading branch information
foxminchan committed Sep 22, 2024
1 parent 18547d7 commit 611f89a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/BookWorm.ServiceDefaults/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicati
.AddHttpClientInstrumentation()
.AddRuntimeInstrumentation()
.AddMeter(InstrumentationOptions.MeterName)
.AddMeter(ActivitySourceProvider.DefaultSourceName);
.AddMeter(ActivitySourceProvider.DefaultSourceName)
.AddMeter("Microsoft.SemanticKernel*");
})
.WithTracing(tracing =>
{
Expand All @@ -67,7 +68,8 @@ public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicati
.AddGrpcClientInstrumentation()
.AddHttpClientInstrumentation()
.AddSource(DiagnosticHeaders.DefaultListenerName)
.AddSource(ActivitySourceProvider.DefaultSourceName);
.AddSource(ActivitySourceProvider.DefaultSourceName)
.AddSource("Microsoft.SemanticKernel*");
});

builder.AddOpenTelemetryExporters();
Expand Down

0 comments on commit 611f89a

Please sign in to comment.