mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
More tracing spans
This commit is contained in:
parent
2e34241465
commit
f35cbfd89e
4 changed files with 15 additions and 0 deletions
|
|
@ -461,6 +461,7 @@ pub(crate) async fn sync_events_route(
|
||||||
Ok(Ra(response))
|
Ok(Ra(response))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(skip_all, fields(room_id = %room_id))]
|
||||||
#[allow(clippy::too_many_arguments, clippy::too_many_lines)]
|
#[allow(clippy::too_many_arguments, clippy::too_many_lines)]
|
||||||
async fn load_joined_room(
|
async fn load_joined_room(
|
||||||
sender_user: &UserId,
|
sender_user: &UserId,
|
||||||
|
|
|
||||||
|
|
@ -361,6 +361,7 @@ fn add_port_to_hostname(destination_str: &str) -> FedDest {
|
||||||
/// Numbers in comments below refer to bullet points in linked section of
|
/// Numbers in comments below refer to bullet points in linked section of
|
||||||
/// specification
|
/// specification
|
||||||
#[allow(clippy::too_many_lines)]
|
#[allow(clippy::too_many_lines)]
|
||||||
|
#[tracing::instrument(ret(level = "debug"))]
|
||||||
async fn find_actual_destination(
|
async fn find_actual_destination(
|
||||||
destination: &'_ ServerName,
|
destination: &'_ ServerName,
|
||||||
) -> (FedDest, FedDest) {
|
) -> (FedDest, FedDest) {
|
||||||
|
|
@ -504,6 +505,7 @@ async fn find_actual_destination(
|
||||||
(actual_destination, hostname)
|
(actual_destination, hostname)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(ret(level = "debug"))]
|
||||||
async fn query_given_srv_record(record: &str) -> Option<FedDest> {
|
async fn query_given_srv_record(record: &str) -> Option<FedDest> {
|
||||||
services()
|
services()
|
||||||
.globals
|
.globals
|
||||||
|
|
@ -525,6 +527,7 @@ async fn query_given_srv_record(record: &str) -> Option<FedDest> {
|
||||||
.unwrap_or(None)
|
.unwrap_or(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(ret(level = "debug"))]
|
||||||
async fn query_srv_record(hostname: &'_ str) -> Option<FedDest> {
|
async fn query_srv_record(hostname: &'_ str) -> Option<FedDest> {
|
||||||
let hostname = hostname.trim_end_matches('.');
|
let hostname = hostname.trim_end_matches('.');
|
||||||
|
|
||||||
|
|
@ -537,6 +540,7 @@ async fn query_srv_record(hostname: &'_ str) -> Option<FedDest> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(ret(level = "debug"))]
|
||||||
async fn request_well_known(destination: &str) -> Option<String> {
|
async fn request_well_known(destination: &str) -> Option<String> {
|
||||||
let response = services()
|
let response = services()
|
||||||
.globals
|
.globals
|
||||||
|
|
@ -678,6 +682,7 @@ pub(crate) async fn get_public_rooms_route(
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(skip(pdu))]
|
||||||
pub(crate) fn parse_incoming_pdu(
|
pub(crate) fn parse_incoming_pdu(
|
||||||
pdu: &RawJsonValue,
|
pdu: &RawJsonValue,
|
||||||
) -> Result<(OwnedEventId, CanonicalJsonObject, OwnedRoomId)> {
|
) -> Result<(OwnedEventId, CanonicalJsonObject, OwnedRoomId)> {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
impl service::rooms::edus::read_receipt::Data for KeyValueDatabase {
|
impl service::rooms::edus::read_receipt::Data for KeyValueDatabase {
|
||||||
|
#[tracing::instrument(skip(self, event))]
|
||||||
fn readreceipt_update(
|
fn readreceipt_update(
|
||||||
&self,
|
&self,
|
||||||
user_id: &UserId,
|
user_id: &UserId,
|
||||||
|
|
|
||||||
|
|
@ -489,6 +489,7 @@ impl service::users::Data for KeyValueDatabase {
|
||||||
Ok(counts)
|
Ok(counts)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(skip(self, device_keys))]
|
||||||
fn add_device_keys(
|
fn add_device_keys(
|
||||||
&self,
|
&self,
|
||||||
user_id: &UserId,
|
user_id: &UserId,
|
||||||
|
|
@ -510,6 +511,12 @@ impl service::users::Data for KeyValueDatabase {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(skip(
|
||||||
|
self,
|
||||||
|
master_key,
|
||||||
|
self_signing_key,
|
||||||
|
user_signing_key
|
||||||
|
))]
|
||||||
fn add_cross_signing_keys(
|
fn add_cross_signing_keys(
|
||||||
&self,
|
&self,
|
||||||
user_id: &UserId,
|
user_id: &UserId,
|
||||||
|
|
@ -724,6 +731,7 @@ impl service::users::Data for KeyValueDatabase {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(skip(self))]
|
||||||
fn mark_device_key_update(&self, user_id: &UserId) -> Result<()> {
|
fn mark_device_key_update(&self, user_id: &UserId) -> Result<()> {
|
||||||
let count = services().globals.next_count()?.to_be_bytes();
|
let count = services().globals.next_count()?.to_be_bytes();
|
||||||
for room_id in services()
|
for room_id in services()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue