From f9420acdfd2221718b45b48d8a089a9f1551f1cd Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 17 Mar 2022 14:21:41 +0100 Subject: [PATCH] Remove unhelpful Client self fields from tracing spans Client's Debug implementation just returns "Client". --- crates/matrix-sdk/src/client/mod.rs | 12 ++++++------ crates/matrix-sdk/src/encryption/mod.rs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/matrix-sdk/src/client/mod.rs b/crates/matrix-sdk/src/client/mod.rs index e8a161bf4..3a1560167 100644 --- a/crates/matrix-sdk/src/client/mod.rs +++ b/crates/matrix-sdk/src/client/mod.rs @@ -697,7 +697,7 @@ impl Client { /// ``` /// /// [`restore_login`]: #method.restore_login - #[instrument(skip(user, password))] + #[instrument(skip(self, user, password))] pub async fn login( &self, user: impl AsRef, @@ -985,7 +985,7 @@ impl Client { /// /// [`get_sso_login_url`]: #method.get_sso_login_url /// [`restore_login`]: #method.restore_login - #[instrument(skip(token))] + #[instrument(skip(self, token))] #[cfg_attr(not(target_arch = "wasm32"), deny(clippy::future_not_send))] pub async fn login_with_token( &self, @@ -1128,7 +1128,7 @@ impl Client { /// client.register(request).await; /// # }) /// ``` - #[instrument(skip(registration))] + #[instrument(skip_all)] pub async fn register( &self, registration: impl Into>, @@ -1666,7 +1666,7 @@ impl Client { /// [`get_or_upload_filter()`]: #method.get_or_upload_filter /// [long polling]: #long-polling /// [filtered]: #filtering-events - #[instrument] + #[instrument(skip(self))] pub async fn sync_once( &self, sync_settings: crate::config::SyncSettings<'_>, @@ -1815,7 +1815,7 @@ impl Client { /// .await; /// }) /// ``` - #[instrument(skip(callback))] + #[instrument(skip(self, callback))] pub async fn sync_with_callback( &self, mut sync_settings: crate::config::SyncSettings<'_>, @@ -1885,7 +1885,7 @@ impl Client { /// /// # Result::<_, matrix_sdk::Error>::Ok(()) }); /// ``` - #[instrument] + #[instrument(skip(self))] pub async fn sync_stream<'a>( &'a self, mut sync_settings: crate::config::SyncSettings<'a>, diff --git a/crates/matrix-sdk/src/encryption/mod.rs b/crates/matrix-sdk/src/encryption/mod.rs index 2f5810744..7500e2071 100644 --- a/crates/matrix-sdk/src/encryption/mod.rs +++ b/crates/matrix-sdk/src/encryption/mod.rs @@ -95,7 +95,7 @@ impl Client { /// /// Panics if no key query needs to be done. #[cfg(feature = "encryption")] - #[instrument] + #[instrument(skip(self))] pub(crate) async fn keys_query( &self, request_id: &TransactionId, @@ -313,7 +313,7 @@ impl Client { /// /// * `users` - The list of user/device pairs that we should claim keys for. #[cfg(feature = "encryption")] - #[instrument(skip(users))] + #[instrument(skip_all)] pub(crate) async fn claim_one_time_keys( &self, users: impl Iterator, @@ -338,7 +338,7 @@ impl Client { /// Panics if the client isn't logged in, or if no encryption keys need to /// be uploaded. #[cfg(feature = "encryption")] - #[instrument] + #[instrument(skip(self))] pub(crate) async fn keys_upload( &self, request_id: &TransactionId,