diff --git a/crates/corro-agent/src/transport.rs b/crates/corro-agent/src/transport.rs index c0d0120f..816afae4 100644 --- a/crates/corro-agent/src/transport.rs +++ b/crates/corro-agent/src/transport.rs @@ -18,7 +18,7 @@ use tokio::{ sync::{mpsc, Mutex, RwLock}, time::error::Elapsed, }; -use tracing::{debug, info_span, warn, Instrument}; +use tracing::{debug, debug_span, warn, Instrument}; use crate::api::peer::gossip_client_endpoint; @@ -95,7 +95,7 @@ impl Transport { let mut stream = match conn .open_uni() - .instrument(info_span!("quic_open_uni")) + .instrument(debug_span!("quic_open_uni")) .await { Ok(stream) => stream, @@ -106,31 +106,31 @@ impl Transport { debug!("retryable error attempting to open unidirectional stream: {e}"); let conn = self.connect(addr).await?; conn.open_uni() - .instrument(info_span!("quic_open_uni")) + .instrument(debug_span!("quic_open_uni")) .await? } }; stream .write_chunk(data) - .instrument(info_span!("quic_write_chunk")) + .instrument(debug_span!("quic_write_chunk")) .await?; stream .finish() - .instrument(info_span!("quic_finish")) + .instrument(debug_span!("quic_finish")) .await?; Ok(()) } - #[tracing::instrument(skip(self), err)] + #[tracing::instrument(skip(self), level = "debug", err)] pub async fn open_bi( &self, addr: SocketAddr, ) -> Result<(SendStream, RecvStream), TransportError> { let conn = self.connect(addr).await?; - match conn.open_bi().instrument(info_span!("quic_open_bi")).await { + match conn.open_bi().instrument(debug_span!("quic_open_bi")).await { Ok(send_recv) => return Ok(send_recv), Err(e @ ConnectionError::VersionMismatch) => { return Err(e.into()); @@ -144,7 +144,7 @@ impl Transport { let conn = self.connect(addr).await?; Ok(conn .open_bi() - .instrument(info_span!("quic_open_bi")) + .instrument(debug_span!("quic_open_bi")) .await?) } @@ -183,7 +183,7 @@ impl Transport { Err(e.into()) } } - }.instrument(info_span!("quic_connect", %addr, rtt = tracing::field::Empty)).await + }.instrument(debug_span!("quic_connect", %addr, rtt = tracing::field::Empty)).await } // this shouldn't block for long... diff --git a/crates/corro-types/src/agent.rs b/crates/corro-types/src/agent.rs index 2e7ca705..058a7fc1 100644 --- a/crates/corro-types/src/agent.rs +++ b/crates/corro-types/src/agent.rs @@ -372,19 +372,19 @@ impl SplitPool { } // get a high priority write connection (e.g. client input) - #[tracing::instrument(skip(self))] + #[tracing::instrument(skip(self), level = "debug")] pub async fn write_priority(&self) -> Result { self.write_inner(&self.0.priority_tx, "priority").await } // get a normal priority write connection (e.g. sync process) - #[tracing::instrument(skip(self))] + #[tracing::instrument(skip(self), level = "debug")] pub async fn write_normal(&self) -> Result { self.write_inner(&self.0.normal_tx, "normal").await } // get a low priority write connection (e.g. background tasks) - #[tracing::instrument(skip(self))] + #[tracing::instrument(skip(self), level = "debug")] pub async fn write_low(&self) -> Result { self.write_inner(&self.0.low_tx, "low").await } diff --git a/crates/corro-types/src/sync.rs b/crates/corro-types/src/sync.rs index 2a191378..23a35168 100644 --- a/crates/corro-types/src/sync.rs +++ b/crates/corro-types/src/sync.rs @@ -268,7 +268,7 @@ impl From for SyncMessage { } // generates a `SyncMessage` to tell another node what versions we're missing -#[tracing::instrument(skip_all)] +#[tracing::instrument(skip_all, level = "debug")] pub async fn generate_sync(bookie: &Bookie, actor_id: ActorId) -> SyncStateV1 { let mut state = SyncStateV1 { actor_id,