Skip to content

Commit

Permalink
Merge pull request #279 from whisperfish/tracing-cleanup
Browse files Browse the repository at this point in the history
Cleanup some tracing
  • Loading branch information
rubdos committed Jan 10, 2024
2 parents 036de0d + 30bd647 commit 5f88d45
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions libsignal-service/src/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,18 @@ where
Ok(plaintext)
}

#[tracing::instrument]
#[tracing::instrument(
skip(address, unidentified_access, content),
fields(
address = %address,
with_unidentified_access = unidentified_access.is_some(),
content_length = content.len(),
)
)]
pub(crate) async fn encrypt(
&mut self,
address: &ProtocolAddress,
unindentified_access: Option<&SenderCertificate>,
unidentified_access: Option<&SenderCertificate>,
content: &[u8],
) -> Result<OutgoingPushMessage, ServiceError> {
let session_record = self
Expand All @@ -337,7 +344,7 @@ where
let padded_content =
add_padding(session_record.session_version()?, content)?;

if let Some(unindentified_access) = unindentified_access {
if let Some(unindentified_access) = unidentified_access {
let destination_registration_id =
session_record.remote_registration_id()?;

Expand Down

0 comments on commit 5f88d45

Please sign in to comment.