diff --git a/crates/matrix-sdk/src/room/futures.rs b/crates/matrix-sdk/src/room/futures.rs index ebe2b6f05..b599df1d5 100644 --- a/crates/matrix-sdk/src/room/futures.rs +++ b/crates/matrix-sdk/src/room/futures.rs @@ -32,7 +32,7 @@ use ruma::{ serde::Raw, OwnedTransactionId, TransactionId, }; -use tracing::{debug, Instrument, Span}; +use tracing::{debug, info, Instrument, Span}; use super::Room; use crate::{ @@ -201,6 +201,10 @@ impl<'a> IntoFuture for SendRawMessageLikeEvent<'a> { ); let response = room.client.send(request, None).await?; + + tracing::Span::current().record("event_id", tracing::field::debug(&response.event_id)); + info!("Sent event in room"); + Ok(response) }; diff --git a/crates/matrix-sdk/src/room/mod.rs b/crates/matrix-sdk/src/room/mod.rs index 5a3571297..6dd09cfd5 100644 --- a/crates/matrix-sdk/src/room/mod.rs +++ b/crates/matrix-sdk/src/room/mod.rs @@ -1652,7 +1652,7 @@ impl Room { /// } /// # anyhow::Ok(()) }; /// ``` - #[instrument(skip_all, fields(event_type, room_id = ?self.room_id(), transaction_id, encrypted))] + #[instrument(skip_all, fields(event_type, room_id = ?self.room_id(), transaction_id, encrypted, event_id))] pub fn send_raw<'a>( &'a self, event_type: &'a str,