From 67a1efc37694c101a385c36b39a6ece4040dbbc1 Mon Sep 17 00:00:00 2001 From: Garren Date: Mon, 15 Aug 2022 15:10:12 +0200 Subject: [PATCH] Update query-engine/query-engine/src/logger.rs Co-authored-by: Alexey Orlenko --- query-engine/query-engine/src/logger.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query-engine/query-engine/src/logger.rs b/query-engine/query-engine/src/logger.rs index 73fe93c1518a..aaf03e7f3e3f 100644 --- a/query-engine/query-engine/src/logger.rs +++ b/query-engine/query-engine/src/logger.rs @@ -87,8 +87,8 @@ impl<'a> Logger<'a> { let tracer = create_otel_tracer(self.service_name, self.telemetry_endpoint); let mut telemetry = tracing_opentelemetry::layer().with_tracer(tracer); - if self.log_capture_exporter.is_some() { - let tracer = crate::capture_tracer::new_pipeline().install_simple(self.log_capture_exporter.unwrap()); + if let Some(log_capture_exporter) = self.log_capture_exporter { + let tracer = crate::capture_tracer::new_pipeline().install_simple(log_capture_exporter); telemetry = telemetry.with_tracer(tracer); }