Update telemetry
This commit is contained in:
@@ -31,6 +31,10 @@ pub struct UnsubFormData {
|
||||
email: String,
|
||||
}
|
||||
|
||||
#[tracing::instrument(
|
||||
name = "Removing subscriber from database",
|
||||
skip(connection_pool, email_client, base_url)
|
||||
)]
|
||||
pub async fn post_unsubscribe(
|
||||
State(AppState {
|
||||
connection_pool,
|
||||
@@ -54,7 +58,7 @@ pub async fn post_unsubscribe(
|
||||
Ok(Html(template.render().unwrap()).into_response())
|
||||
}
|
||||
|
||||
#[tracing::instrument(name = "Fetching unsubscribe token from the database", skip_all)]
|
||||
#[tracing::instrument(name = "Fetching unsubscribe token from database", skip_all)]
|
||||
async fn fetch_unsubscribe_token(
|
||||
connection_pool: &PgPool,
|
||||
subscriber_email: &SubscriberEmail,
|
||||
@@ -69,7 +73,7 @@ async fn fetch_unsubscribe_token(
|
||||
Ok(r.and_then(|r| r.unsubscribe_token))
|
||||
}
|
||||
|
||||
#[tracing::instrument(name = "Send an unsubscribe confirmation email", skip_all)]
|
||||
#[tracing::instrument(name = "Send an confirmation email", skip_all)]
|
||||
pub async fn send_unsubscribe_email(
|
||||
email_client: &EmailClient,
|
||||
subscriber_email: &SubscriberEmail,
|
||||
@@ -102,7 +106,7 @@ If you did not request this, you can safely ignore this email."#,
|
||||
.await
|
||||
}
|
||||
|
||||
#[tracing::instrument(name = "Removing user from database if he exists", skip_all)]
|
||||
#[tracing::instrument(name = "Removing user from database", skip(connection_pool))]
|
||||
pub async fn unsubscribe_confirm(
|
||||
Query(UnsubQueryParams { token }): Query<UnsubQueryParams>,
|
||||
State(AppState {
|
||||
|
||||
Reference in New Issue
Block a user