From f13e2c3f325a28665ff385e6aa8eddfb8aea2078 Mon Sep 17 00:00:00 2001 From: Lennart Kloock Date: Wed, 15 Jan 2025 19:22:54 +0100 Subject: [PATCH] test(bootstrap-telemetry): fix test --- crates/bootstrap/telemetry/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/bootstrap/telemetry/src/lib.rs b/crates/bootstrap/telemetry/src/lib.rs index a7993b2c2..14f19856e 100644 --- a/crates/bootstrap/telemetry/src/lib.rs +++ b/crates/bootstrap/telemetry/src/lib.rs @@ -418,12 +418,14 @@ mod tests { let exporter = scuffle_metrics::prometheus::exporter().build(); prometheus.register_collector(exporter.collector()); let provider = SdkMeterProvider::builder().with_reader(exporter).build(); - opentelemetry::global::set_meter_provider(provider); + opentelemetry::global::set_meter_provider(provider.clone()); + + let open_telemetry = crate::opentelemetry::OpenTelemetry::new().with_metrics(provider); Ok(Arc::new(TestGlobal { bind_addr, prometheus, - open_telemetry: crate::opentelemetry::OpenTelemetry::new(), + open_telemetry, })) } }