@@ -32,7 +32,9 @@ use ruma::{
3232 serde:: Raw ,
3333 OwnedTransactionId , TransactionId ,
3434} ;
35- use tracing:: { debug, info, Instrument , Span } ;
35+ #[ cfg( feature = "image-proc" ) ]
36+ use tracing:: debug;
37+ use tracing:: { info, trace, Instrument , Span } ;
3638
3739use super :: Room ;
3840#[ cfg( feature = "image-proc" ) ]
@@ -172,17 +174,17 @@ impl<'a> IntoFuture for SendRawMessageLikeEvent<'a> {
172174 Span :: current ( ) . record ( "transaction_id" , tracing:: field:: debug ( & txn_id) ) ;
173175
174176 #[ cfg( not( feature = "e2e-encryption" ) ) ]
175- debug ! ( "Sending plaintext event to room because we don't have encryption support." ) ;
177+ trace ! ( "Sending plaintext event to room because we don't have encryption support." ) ;
176178
177179 #[ cfg( feature = "e2e-encryption" ) ]
178180 if room. is_encrypted ( ) . await ? {
179- Span :: current ( ) . record ( "encrypted " , true ) ;
181+ Span :: current ( ) . record ( "is_room_encrypted " , true ) ;
180182 // Reactions are currently famously not encrypted, skip encrypting
181183 // them until they are.
182184 if event_type == "m.reaction" {
183- debug ! ( "Sending plaintext event because of the event type." ) ;
185+ trace ! ( "Sending plaintext event because of the event type." ) ;
184186 } else {
185- debug ! (
187+ trace ! (
186188 room_id = ?room. room_id( ) ,
187189 "Sending encrypted event because the room is encrypted." ,
188190 ) ;
@@ -210,8 +212,8 @@ impl<'a> IntoFuture for SendRawMessageLikeEvent<'a> {
210212 event_type = "m.room.encrypted" ;
211213 }
212214 } else {
213- Span :: current ( ) . record ( "encrypted " , false ) ;
214- debug ! ( "Sending plaintext event because the room is NOT encrypted." , ) ;
215+ Span :: current ( ) . record ( "is_room_encrypted " , false ) ;
216+ trace ! ( "Sending plaintext event because the room is NOT encrypted." , ) ;
215217 } ;
216218
217219 let request = send_message_event:: v3:: Request :: new_raw (
0 commit comments