diff --git a/Server/Program.cs b/Server/Program.cs index 06eb989..212fc75 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -24,6 +24,8 @@ var builder = Host.CreateApplicationBuilder(); builder.Environment.EnvironmentName = "Development"; #endif +builder.Services.AddMetrics(); + builder.Configuration.AddJsonFile("settings.json", true, true) .AddJsonFile($"settings.{builder.Environment.EnvironmentName}.json", true) .AddEnvironmentVariables().Build(); @@ -47,16 +49,13 @@ if (configuration.GetValue("Tracing:Enabled")) .WithTracing(tracing => { tracing.AddSource(nameof(Server)); - tracing.SetSampler(new AlwaysOnSampler()); - tracing.AddMassTransitInstrumentation(); + //tracing.AddSource("MassTransit"); tracing.AddEntityFrameworkCoreInstrumentation(options => options.SetDbStatementForText = true); - tracing.AddHttpClientInstrumentation(); tracing.AddNpgsql(); }) .WithMetrics(metrics => { metrics.AddRuntimeInstrumentation(); - metrics.AddHttpClientInstrumentation(); }); builder.Logging.AddOpenTelemetry(logging =>