instrumentation of nym-node to nym-gateway workflow
This commit is contained in:
@@ -1081,10 +1081,10 @@ impl<R, S> FreshHandler<R, S> {
|
||||
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}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<R, S>(mut handle: FreshHandler<R, S>)
|
||||
where
|
||||
R: Rng + CryptoRng + Send,
|
||||
|
||||
@@ -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:#?}");
|
||||
|
||||
|
||||
@@ -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<C, F> PacketForwarder<C, F> {
|
||||
self.packet_sender.clone()
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
fn forward_packet(&mut self, packet: MixPacket)
|
||||
where
|
||||
C: SendWithoutResponse,
|
||||
@@ -78,6 +79,7 @@ impl<C, F> PacketForwarder<C, F> {
|
||||
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<C, F> PacketForwarder<C, F> {
|
||||
.update_packet_forwarder_queue_size(channel_size)
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn run(&mut self, shutdown_token: ShutdownToken)
|
||||
where
|
||||
C: SendWithoutResponse,
|
||||
|
||||
@@ -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<F>(
|
||||
&self,
|
||||
active_clients_store: &ActiveClientsStore,
|
||||
@@ -1146,6 +1148,7 @@ impl NymNode {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn start_nym_node_tasks(mut self) -> Result<ShutdownManager, NymNodeError> {
|
||||
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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user