diff --git a/xmtp_mls/src/client.rs b/xmtp_mls/src/client.rs index fff0f1336..12a56a324 100644 --- a/xmtp_mls/src/client.rs +++ b/xmtp_mls/src/client.rs @@ -172,7 +172,10 @@ pub enum MessageProcessingError { impl crate::retry::RetryableError for MessageProcessingError { fn is_retryable(&self) -> bool { match self { - Self::Storage(s) => s.is_retryable(), + Self::Group(group_error) => retryable!(group_error), + Self::Identity(identity_error) => retryable!(identity_error), + Self::Diesel(diesel_error) => retryable!(diesel_error), + Self::Storage(s) => retryable!(s), Self::Generic(err) => err.contains("database is locked"), _ => false, } diff --git a/xmtp_mls/src/groups/sync.rs b/xmtp_mls/src/groups/sync.rs index e27f8557b..a867fe647 100644 --- a/xmtp_mls/src/groups/sync.rs +++ b/xmtp_mls/src/groups/sync.rs @@ -96,7 +96,7 @@ impl MlsGroup { self.sync_with_conn(conn, client).await } - #[tracing::instrument(level = "trace", skip(client, conn))] + #[tracing::instrument(level = "trace", skip(client, self, conn))] pub(super) async fn sync_with_conn( &self, conn: DbConnection, @@ -141,7 +141,7 @@ impl MlsGroup { * * This method will retry up to `crate::configuration::MAX_GROUP_SYNC_RETRIES` times. */ - #[tracing::instrument(level = "trace", skip(client, conn))] + #[tracing::instrument(level = "trace", skip(client, self, conn))] pub(super) async fn sync_until_intent_resolved( &self, conn: DbConnection, @@ -678,7 +678,7 @@ impl MlsGroup { } } - #[tracing::instrument(level = "trace", skip(conn, client))] + #[tracing::instrument(level = "trace", skip(conn, client, self))] pub(super) async fn receive( &self, conn: &DbConnection, @@ -740,7 +740,7 @@ impl MlsGroup { Ok(Some(msg)) } - #[tracing::instrument(level = "trace", skip(conn, client))] + #[tracing::instrument(level = "trace", skip(conn, self, client))] pub(super) async fn publish_intents( &self, conn: DbConnection, diff --git a/xmtp_mls/src/lib.rs b/xmtp_mls/src/lib.rs index 1a08e5c58..80527f0e5 100644 --- a/xmtp_mls/src/lib.rs +++ b/xmtp_mls/src/lib.rs @@ -60,6 +60,7 @@ pub trait Delete { #[cfg(test)] mod tests { + use log::LevelFilter; use tracing_test::traced_test; // Execute once before any tests are run @@ -68,7 +69,7 @@ mod tests { #[traced_test] fn setup() { // Capture logs (e.g. log::info!()) as traces too - let _ = tracing_log::LogTracer::init(); + let _ = tracing_log::LogTracer::init_with_filter(LevelFilter::Debug); } /// Note: tests that use this must have the #[traced_test] attribute