From dd59f048f51176f555df7e8c9f798e7a2ddf684a Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Thu, 21 Sep 2023 09:34:02 -0400 Subject: [PATCH] Added gRPC instrumentation --- src/Serval.ApiServer/Serval.ApiServer.csproj | 1 + src/Serval.ApiServer/Startup.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Serval.ApiServer/Serval.ApiServer.csproj b/src/Serval.ApiServer/Serval.ApiServer.csproj index a401910a..ae23fe3f 100644 --- a/src/Serval.ApiServer/Serval.ApiServer.csproj +++ b/src/Serval.ApiServer/Serval.ApiServer.csproj @@ -24,6 +24,7 @@ + diff --git a/src/Serval.ApiServer/Startup.cs b/src/Serval.ApiServer/Startup.cs index 447962d8..6b377f42 100644 --- a/src/Serval.ApiServer/Startup.cs +++ b/src/Serval.ApiServer/Startup.cs @@ -162,9 +162,12 @@ public void ConfigureServices(IServiceCollection services) .AddOpenTelemetry() .WithTracing(builder => { - builder.AddAspNetCoreInstrumentation().AddConsoleExporter(); - builder.AddHttpClientInstrumentation().AddConsoleExporter(); - builder.AddSource("MongoDB.Driver.Core.Extensions.DiagnosticSources").AddConsoleExporter(); + builder + .AddAspNetCoreInstrumentation() + .AddHttpClientInstrumentation() + .AddGrpcClientInstrumentation() + .AddSource("MongoDB.Driver.Core.Extensions.DiagnosticSources") + .AddConsoleExporter(); }); }