diff --git a/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs b/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs index dec76b1f3d..3e2b639e0a 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/fresh.rs @@ -1081,10 +1081,10 @@ impl FreshHandler { let shutdown = self.shutdown.clone(); tokio::select! { _ = shutdown.cancelled() => { - trace!("received cancellation") + tracing::trace!("received cancellation") } _ = super::handle_connection(self) => { - debug!("finished connection handler for {remote}") + tracing::debug!("finished connection handler for {remote}") } } } diff --git a/gateway/src/node/client_handling/websocket/connection_handler/mod.rs b/gateway/src/node/client_handling/websocket/connection_handler/mod.rs index 6f98b64275..9528f72f78 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/mod.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/mod.rs @@ -92,7 +92,7 @@ impl InitialAuthResult { } // imo there's no point in including the peer address in anything higher than debug -#[instrument(level = "debug", skip_all)] +#[instrument(skip_all)] pub(crate) async fn handle_connection(mut handle: FreshHandler) where R: Rng + CryptoRng + Send, diff --git a/nym-node/src/cli/commands/run/mod.rs b/nym-node/src/cli/commands/run/mod.rs index 703e47662b..3112e9c9c6 100644 --- a/nym-node/src/cli/commands/run/mod.rs +++ b/nym-node/src/cli/commands/run/mod.rs @@ -8,7 +8,7 @@ use crate::node::mixnet::packet_forwarding::global::is_global_ip; use crate::node::NymNode; use std::fs; use std::net::IpAddr; -use tracing::{debug, info, trace, warn}; +use tracing::{debug, info, instrument, trace, warn}; mod args; @@ -37,6 +37,7 @@ fn check_public_ips(ips: &[IpAddr], local: bool) -> Result<(), NymNodeError> { Ok(()) } +#[instrument(skip_all)] pub(crate) async fn execute(mut args: Args) -> Result<(), NymNodeError> { trace!("passed arguments: {args:#?}"); diff --git a/nym-node/src/node/mixnet/packet_forwarding/mod.rs b/nym-node/src/node/mixnet/packet_forwarding/mod.rs index d76e4cea55..dcdc4221f8 100644 --- a/nym-node/src/node/mixnet/packet_forwarding/mod.rs +++ b/nym-node/src/node/mixnet/packet_forwarding/mod.rs @@ -13,7 +13,7 @@ use nym_sphinx_forwarding::packet::MixPacket; use nym_task::ShutdownToken; use std::io; use tokio::time::Instant; -use tracing::{debug, error, trace, warn}; +use tracing::{debug, error, instrument, trace, warn}; pub(crate) mod global; @@ -46,6 +46,7 @@ impl PacketForwarder { self.packet_sender.clone() } + #[instrument(skip_all)] fn forward_packet(&mut self, packet: MixPacket) where C: SendWithoutResponse, @@ -78,6 +79,7 @@ impl PacketForwarder { self.forward_packet(delayed_packet); } + #[instrument(skip_all)] fn handle_new_packet(&mut self, new_packet: PacketToForward) where C: SendWithoutResponse, @@ -120,6 +122,7 @@ impl PacketForwarder { .update_packet_forwarder_queue_size(channel_size) } + #[instrument(skip_all)] pub async fn run(&mut self, shutdown_token: ShutdownToken) where C: SendWithoutResponse, diff --git a/nym-node/src/node/mod.rs b/nym-node/src/node/mod.rs index eac6e56c6e..5ecdf80862 100644 --- a/nym-node/src/node/mod.rs +++ b/nym-node/src/node/mod.rs @@ -66,7 +66,7 @@ use std::ops::Deref; use std::path::Path; use std::sync::Arc; use tokio::sync::mpsc; -use tracing::{debug, info, trace}; +use tracing::{debug, info, instrument, trace}; use zeroize::Zeroizing; pub mod bonding_information; @@ -601,6 +601,7 @@ impl NymNode { }) } + #[instrument(skip_all)] async fn start_gateway_tasks( &mut self, cached_network: CachedNetwork, @@ -1050,6 +1051,7 @@ impl NymNode { Ok(()) } + #[instrument(skip_all)] pub(crate) async fn start_mixnet_listener( &self, active_clients_store: &ActiveClientsStore, @@ -1146,6 +1148,7 @@ impl NymNode { Ok(()) } + #[instrument(skip_all)] async fn start_nym_node_tasks(mut self) -> Result { info!("starting Nym Node {} with the following modes: mixnode: {}, entry: {}, exit: {}, wireguard: {}", self.ed25519_identity_key(), @@ -1219,6 +1222,7 @@ impl NymNode { Ok(self.shutdown_manager) } + #[instrument(skip_all)] pub(crate) async fn run(mut self) -> Result<(), NymNodeError> { let mut shutdown_signals = self.shutdown_manager.detach_shutdown_signals();