crypto: add some instrumentation to get_room_event_encryption_info

It helps to know which event we're getting the encryption info for.
This commit is contained in:
Richard van der Hoff
2025-05-14 18:24:35 +01:00
parent 404a982503
commit c2eeca3f33

View File

@@ -2270,6 +2270,7 @@ impl OlmMachine {
///
/// * `event` - The event to get information for.
/// * `room_id` - The ID of the room where the event was sent to.
#[instrument(skip(self, event), fields(event_id, sender, session_id))]
pub async fn get_room_event_encryption_info(
&self,
event: &Raw<EncryptedEvent>,
@@ -2286,6 +2287,11 @@ impl OlmMachine {
}
};
Span::current()
.record("sender", debug(&event.sender))
.record("event_id", debug(&event.event_id))
.record("session_id", content.session_id());
self.get_session_encryption_info(room_id, content.session_id(), &event.sender).await
}