Skip to content

Commit

Permalink
clean Kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
andracc committed Sep 24, 2024
1 parent bd8a3d7 commit 9bf3355
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions Backend/Otel/OtelKernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ public static class OtelKernel
{

public const string SourceName = "Backend-Otel";
// private readonly LocationCache _locationCache;

// public OtelKernel(LocationCache locationCache, IServiceCollection serviceCollection)
// {
// _locationCache = locationCache;
// AddOpenTelemetryInstrumentation(serviceCollection);
// }

[ExcludeFromCodeCoverage]
private static void AspNetCoreBuilder(AspNetCoreTraceInstrumentationOptions options)
Expand Down Expand Up @@ -89,8 +82,6 @@ private static void HttpClientBuilder(HttpClientTraceInstrumentationOptions opti
{
activity.SetTag("outbound.http.response.body.size", "no content");
}

// await GetLocation(activity);
};
options.EnrichWithHttpResponseMessage = (activity, response) =>
{
Expand All @@ -105,7 +96,6 @@ private static void HttpClientBuilder(HttpClientTraceInstrumentationOptions opti
public static void AddOpenTelemetryInstrumentation(this IServiceCollection services)
{
var appResourceBuilder = ResourceBuilder.CreateDefault();
// var appResourceBuilder = ResourceBuilder.CreateDefault().AddService(ServiceName);
// todo: include version
services.AddOpenTelemetry().WithTracing(tracerProviderBuilder => tracerProviderBuilder
.SetResourceBuilder(appResourceBuilder)
Expand All @@ -118,19 +108,6 @@ public static void AddOpenTelemetryInstrumentation(this IServiceCollection servi
.AddOtlpExporter()
);

// var meter = new Meter(ServiceName);
// // var counter = meter.CreateCounter<int>("words-created");
// services.AddOpenTelemetry().WithMetrics(metricProviderBuilder => metricProviderBuilder
// .SetResourceBuilder(appResourceBuilder)
// .AddMeter(meter.Name)
// .AddAspNetCoreInstrumentation()
// .AddHttpClientInstrumentation()
// .AddConsoleExporter()
// .AddOtlpExporter()
// );

// var meter = new Meter(ServiceName);

}

// private static void EnrichWithUser(this Activity activity, HttpContext httpContext)
Expand Down

0 comments on commit 9bf3355

Please sign in to comment.