From aa90ce5bab02bbee9a256f2be8586581918bad52 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Tue, 8 Oct 2024 11:52:38 -0700 Subject: [PATCH] refactor: allow resolve span to be disabled (#153) --- src/client/legacy/connect/dns.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/legacy/connect/dns.rs b/src/client/legacy/connect/dns.rs index fa6f74d..7530d12 100644 --- a/src/client/legacy/connect/dns.rs +++ b/src/client/legacy/connect/dns.rs @@ -31,7 +31,7 @@ use std::{fmt, io, vec}; use tokio::task::JoinHandle; use tower_service::Service; -use tracing::{debug, debug_span}; +use tracing::debug_span; pub(super) use self::sealed::Resolve; @@ -118,10 +118,9 @@ impl Service for GaiResolver { } fn call(&mut self, name: Name) -> Self::Future { - let span = debug_span!("resolve", host = %name.host).or_current(); + let span = debug_span!("resolve", host = %name.host); let blocking = tokio::task::spawn_blocking(move || { let _enter = span.enter(); - debug!(host = name.host, "resolving"); (&*name.host, 0) .to_socket_addrs() .map(|i| SocketAddrs { iter: i })