diff --git a/zebra-network/src/peer/client.rs b/zebra-network/src/peer/client.rs index 912067660..8def31c22 100644 --- a/zebra-network/src/peer/client.rs +++ b/zebra-network/src/peer/client.rs @@ -56,6 +56,7 @@ impl MustUseOneshotSender { /// Forwards `t` to `tx.send()`, and marks this sender as used. /// /// Panics if `tx.send()` is used more than once. + #[instrument(skip(self))] pub fn send(mut self, t: T) -> Result<(), T> { self.tx .take() @@ -71,6 +72,7 @@ impl MustUseOneshotSender { /// Returns `tx.cancellation()`. /// /// Panics if `tx.send()` has previously been used. + #[instrument(skip(self))] pub fn cancellation(&mut self) -> oneshot::Cancellation<'_, T> { self.tx .as_mut() @@ -83,6 +85,7 @@ impl MustUseOneshotSender { /// Returns `tx.is_canceled()`. /// /// Panics if `tx.send()` has previously been used. + #[instrument(skip(self))] pub fn is_canceled(&self) -> bool { self.tx .as_ref() @@ -99,6 +102,7 @@ impl From> for MustUseOneshotSender { } impl Drop for MustUseOneshotSender { + #[instrument(skip(self))] fn drop(&mut self) { // is_canceled() will not panic, because we check is_none() first assert!( @@ -126,6 +130,7 @@ impl Service for Client { } } + #[instrument(skip(self))] fn call(&mut self, request: Request) -> Self::Future { use futures::future::FutureExt; diff --git a/zebra-network/src/peer/connection.rs b/zebra-network/src/peer/connection.rs index 980af0a25..bf046ea8d 100644 --- a/zebra-network/src/peer/connection.rs +++ b/zebra-network/src/peer/connection.rs @@ -341,6 +341,7 @@ where Tx: Sink + Unpin, { /// Consume this `Connection` to form a spawnable future containing its event loop. + #[instrument(skip(self, peer_rx))] pub async fn run(mut self, mut peer_rx: Rx) where Rx: Stream> + Unpin, @@ -533,6 +534,7 @@ where /// remote peer. /// /// NOTE: the caller should use .instrument(msg.span) to instrument the function. + #[instrument(skip(self))] async fn handle_client_request(&mut self, req: ClientRequest) { trace!(?req.request); use Request::*; diff --git a/zebra-network/src/peer/handshake.rs b/zebra-network/src/peer/handshake.rs index 18424585d..5bdfcd03f 100644 --- a/zebra-network/src/peer/handshake.rs +++ b/zebra-network/src/peer/handshake.rs @@ -188,6 +188,7 @@ where Poll::Ready(Ok(())) } + #[instrument(skip(self))] fn call(&mut self, req: (TcpStream, SocketAddr)) -> Self::Future { let (tcp_stream, addr) = req;