diff --git a/rust/connlib/clients/shared/src/control.rs b/rust/connlib/clients/shared/src/control.rs index 769b4c0ca..2f4dc0143 100644 --- a/rust/connlib/clients/shared/src/control.rs +++ b/rust/connlib/clients/shared/src/control.rs @@ -112,7 +112,6 @@ fn sentinel_dns_mapping(dns: &[DnsServer]) -> BiMap { } impl ControlPlane { - #[tracing::instrument(level = "trace", skip(self))] async fn init( &mut self, InitClient { @@ -159,7 +158,6 @@ impl ControlPlane { Ok(()) } - #[tracing::instrument(level = "trace", skip(self))] pub fn connect( &mut self, Connect { @@ -191,7 +189,6 @@ impl ControlPlane { } } - #[tracing::instrument(level = "trace", skip(self))] pub fn add_resource(&self, resource_description: ResourceDescription) { if let Err(e) = self.tunnel.add_resource(resource_description) { tracing::error!(message = "Can't add resource", error = ?e); @@ -203,7 +200,6 @@ impl ControlPlane { // TODO } - #[tracing::instrument(level = "trace", skip(self))] fn connection_details( &self, ConnectionDetails { @@ -271,7 +267,7 @@ impl ControlPlane { } } - #[tracing::instrument(level = "trace", skip(self))] + #[tracing::instrument(level = "trace", skip(self, msg))] pub async fn handle_message( &mut self, msg: Messages, diff --git a/rust/connlib/shared/src/control.rs b/rust/connlib/shared/src/control.rs index 43a0b9fe3..c18378d1c 100644 --- a/rust/connlib/shared/src/control.rs +++ b/rust/connlib/shared/src/control.rs @@ -123,7 +123,6 @@ where /// // TODO: this is not very elegant but it was the easiest way to do reset the exponential backoff for now /// Furthermore, it calls the given callback once it connects to the portal. - #[tracing::instrument(level = "trace", skip(self, after_connection_ends))] pub async fn start( &mut self, topics: Vec, @@ -210,10 +209,7 @@ where Ok(()) } - #[tracing::instrument(level = "trace", skip(handler))] async fn message_process(handler: &F, message: tungstenite::Message) -> Result<()> { - tracing::trace!("{message:?}"); - match message.into_text() { Ok(m_str) => match serde_json::from_str::>(&m_str) { Ok(m) => match m.payload { diff --git a/rust/connlib/tunnel/src/client.rs b/rust/connlib/tunnel/src/client.rs index 5672f0e0a..8e115e4a9 100644 --- a/rust/connlib/tunnel/src/client.rs +++ b/rust/connlib/tunnel/src/client.rs @@ -61,7 +61,6 @@ where /// /// Once added, when a packet for the resource is intercepted a new data channel will be created /// and packets will be wrapped with wireguard and sent through it. - #[tracing::instrument(level = "trace", skip(self))] pub fn add_resource( &self, resource_description: ResourceDescription, diff --git a/rust/connlib/tunnel/src/control_protocol/client.rs b/rust/connlib/tunnel/src/control_protocol/client.rs index ecdee79d5..8b93d5f26 100644 --- a/rust/connlib/tunnel/src/control_protocol/client.rs +++ b/rust/connlib/tunnel/src/control_protocol/client.rs @@ -76,7 +76,7 @@ where /// /// # Returns /// A [RequestConnection] that should be sent to the gateway through the control-plane. - #[tracing::instrument(level = "trace", skip(self))] + #[tracing::instrument(level = "trace", skip_all, fields(%resource_id, %gateway_id))] pub async fn request_connection( self: &Arc, resource_id: ResourceId, @@ -84,7 +84,7 @@ where relays: Vec, reference: Option, ) -> Result { - tracing::trace!(%gateway_id, %resource_id, "request_connection"); + tracing::trace!("request_connection"); let reference: usize = reference .ok_or(Error::InvalidReference)?