diff --git a/Backend/Otel/OtelKernel.cs b/Backend/Otel/OtelKernel.cs index 77bf9ffe32..948f0ac455 100644 --- a/Backend/Otel/OtelKernel.cs +++ b/Backend/Otel/OtelKernel.cs @@ -1,8 +1,8 @@ -using System.Diagnostics; +// using System.Diagnostics; // using BackendFramework.Interfaces; using System.Diagnostics.CodeAnalysis; using Microsoft.Extensions.DependencyInjection; -using OpenTelemetry; +// using OpenTelemetry; using OpenTelemetry.Instrumentation.AspNetCore; using OpenTelemetry.Instrumentation.Http; using OpenTelemetry.Metrics; @@ -129,7 +129,7 @@ public static void AddOpenTelemetryInstrumentation(this IServiceCollection servi services.AddOpenTelemetry().WithTracing(tracerProviderBuilder => tracerProviderBuilder .SetResourceBuilder(appResourceBuilder) .AddSource(SourceName) - .AddProcessor() + // .AddProcessor() .AddAspNetCoreInstrumentation(AspNetCoreBuilder) .AddHttpClientInstrumentation(HttpClientBuilder) .AddConsoleExporter() @@ -137,32 +137,5 @@ public static void AddOpenTelemetryInstrumentation(this IServiceCollection servi ); } } - internal class LocationEnricher() : BaseProcessor - { - public override void OnEnd(Activity data) - { - // string? uriPath = (string?)data.GetTagItem("url.full"); - // string locationUri = LocationProvider.locationGetterUri; - // if (uriPath == null || !uriPath.Contains(locationUri)) - // { - // LocationApi? response = await locationProvider.GetLocation(); - // var location = new - // { - // Country = response?.country, - // Region = response?.regionName, - // City = response?.city, - // }; - // data?.AddTag("country", location.Country); - // data?.AddTag("region", location.Region); - // data?.AddTag("city", location.City); - // } - // data?.SetTag("SESSIONID BAGGAGE", data?.GetBaggageItem("sessionId")); - // if (uriPath != null && uriPath.Contains(locationUri)) - // { - // data?.SetTag("url.full", ""); - // data?.SetTag("url.redacted.ip", LocationProvider.locationGetterUri); - // } - } - } }