From 0eaed7d307b4bc7d089eb8cc414b8833d510712b Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Fri, 29 Nov 2024 11:35:45 +0100 Subject: [PATCH] instrument spawned task --- iroh/src/protocol.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iroh/src/protocol.rs b/iroh/src/protocol.rs index 8509ae9bd4..6349063255 100644 --- a/iroh/src/protocol.rs +++ b/iroh/src/protocol.rs @@ -47,7 +47,7 @@ use futures_buffered::join_all; use futures_lite::future::Boxed as BoxedFuture; use tokio::{sync::Mutex, task::JoinSet}; use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle}; -use tracing::{error, trace, warn}; +use tracing::{error, info_span, trace, warn, Instrument}; use crate::{endpoint::Connecting, Endpoint}; @@ -316,7 +316,7 @@ impl RouterBuilder { let token = cancel_token.child_token(); join_set.spawn(async move { token.run_until_cancelled(handle_connection(incoming, protocols)).await - }); + }.instrument(info_span!("router.accept"))); }, } }