Update OpenTelemetry exporter configuration

This commit is contained in:
Simon Larsen
2023-12-30 22:08:37 +00:00
parent a27c94395e
commit a6d1b29770
7 changed files with 20 additions and 7 deletions

View File

@@ -28,8 +28,7 @@ builder.Logging.AddOpenTelemetry(logging =>
.AddConsoleExporter()
.AddOtlpExporter(opt =>
{
opt.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.HttpProtobuf;
System.Console.WriteLine($"OTLP Exporter is using {opt.Protocol} protocol and endpoint {opt.Endpoint}");
});
});
@@ -43,7 +42,7 @@ builder.Services.AddOpenTelemetry()
.AddConsoleExporter()
.AddOtlpExporter(opt =>
{
opt.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.HttpProtobuf;
System.Console.WriteLine($"OTLP Exporter is using {opt.Protocol} protocol and endpoint {opt.Endpoint}");
}));
@@ -65,8 +64,7 @@ builder.Services.AddOpenTelemetry()
})
.AddOtlpExporter(opt =>
{
opt.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.HttpProtobuf;
System.Console.WriteLine($"OTLP Exporter is using {opt.Protocol} protocol and endpoint {opt.Endpoint}");
}));

View File

@@ -46,3 +46,6 @@
2.0
2.0
2.0
2.0
2.0
2.0