From c778e681ea1bbf990dde59af5b8f3e76a4fac810 Mon Sep 17 00:00:00 2001 From: Roger Johansson Date: Sat, 3 Dec 2022 13:45:06 +0100 Subject: [PATCH] force flush otel (#1875) --- tests/Proto.Cluster.Tests/ClusterFixture.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Proto.Cluster.Tests/ClusterFixture.cs b/tests/Proto.Cluster.Tests/ClusterFixture.cs index 41382ff047..6d7d7f144d 100644 --- a/tests/Proto.Cluster.Tests/ClusterFixture.cs +++ b/tests/Proto.Cluster.Tests/ClusterFixture.cs @@ -115,6 +115,7 @@ public async Task DisposeAsync() { await WaitForMembersToShutdown(); } + _tracerProvider?.ForceFlush(1000); } else { @@ -205,7 +206,7 @@ private static void InitOpenTelemetryTracing() var services = new ServiceCollection(); services.AddLogging(l => { - l.SetMinimumLevel(LogLevel.Warning); + l.SetMinimumLevel(LogLevel.Debug); l.AddOpenTelemetry( options => { @@ -214,7 +215,7 @@ private static void InitOpenTelemetryTracing() .AddOtlpExporter(o => { o.Endpoint = endpoint; - o.ExportProcessorType = ExportProcessorType.Simple; + o.ExportProcessorType = ExportProcessorType.Batch; }); }); }); @@ -234,7 +235,7 @@ private static void InitOpenTelemetryTracing() .AddOtlpExporter(options => { options.Endpoint = endpoint; - options.ExportProcessorType = ExportProcessorType.Simple; + options.ExportProcessorType = ExportProcessorType.Batch; }) .Build(); }