Skip to content

Commit

Permalink
cleanup/reduce some tracing spans.
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Volk <[email protected]>
  • Loading branch information
jevolk committed Jun 5, 2024
1 parent deee3d2 commit 33fbbe0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/service/sending/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl Service {
}
}

#[tracing::instrument(skip(self, dest, new_events, statuses))]
#[tracing::instrument(skip_all)]
fn select_events(
&self,
dest: &Destination,
Expand Down Expand Up @@ -206,7 +206,7 @@ impl Service {
Ok(Some(events))
}

#[tracing::instrument(skip(self, dest, statuses))]
#[tracing::instrument(skip_all)]
fn select_events_current(&self, dest: Destination, statuses: &mut CurTransactionStatus) -> Result<(bool, bool)> {
let (mut allow, mut retry) = (true, false);
statuses
Expand Down Expand Up @@ -234,7 +234,7 @@ impl Service {
Ok((allow, retry))
}

#[tracing::instrument(skip(self, server_name))]
#[tracing::instrument(skip_all)]
fn select_edus(&self, server_name: &ServerName) -> Result<(Vec<Vec<u8>>, u64)> {
// u64: count of last edu
let since = self.db.get_latest_educount(server_name)?;
Expand Down Expand Up @@ -285,7 +285,6 @@ impl Service {
}

/// Look for presence
#[tracing::instrument(skip(server_name, since, max_edu_count, events))]
fn select_edus_presence(
server_name: &ServerName, since: u64, max_edu_count: &mut u64, events: &mut Vec<Vec<u8>>,
) -> Result<bool> {
Expand Down Expand Up @@ -330,7 +329,6 @@ fn select_edus_presence(
}

/// Look for read receipts in this room
#[tracing::instrument(skip(room_id, since, max_edu_count, events))]
fn select_edus_receipts(
room_id: &RoomId, since: u64, max_edu_count: &mut u64, events: &mut Vec<Vec<u8>>,
) -> Result<bool> {
Expand Down

0 comments on commit 33fbbe0

Please sign in to comment.