1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00

Better tracing spans

This commit is contained in:
Quentin Gliech
2023-01-04 16:02:42 +01:00
parent 09a567ab17
commit a7883618be
12 changed files with 101 additions and 24 deletions

View File

@ -100,10 +100,10 @@ impl Mailer {
///
/// Will return `Err` if the email failed rendering or failed sending
#[tracing::instrument(
name = "email.verification.send",
skip_all,
fields(
email.to = %to,
email.from = %self.from,
user.id = %context.user().id,
user_email_verification.id = %context.verification().id,
user_email_verification.code = context.verification().code,
@ -125,6 +125,7 @@ impl Mailer {
/// # Errors
///
/// Returns an error if the connection failed
#[tracing::instrument(name = "email.test_connection", skip_all, err)]
pub async fn test_connection(&self) -> Result<(), crate::transport::Error> {
self.transport.test_connection().await
}