Skip to content

Commit

Permalink
refactor: allow resolve span to be disabled (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar authored Oct 8, 2024
1 parent 4dda024 commit aa90ce5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/client/legacy/connect/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -118,10 +118,9 @@ impl Service<Name> 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 })
Expand Down

0 comments on commit aa90ce5

Please sign in to comment.