Update telemetry
Some checks failed
Rust / Test (push) Has been cancelled
Rust / Rustfmt (push) Has been cancelled
Rust / Clippy (push) Has been cancelled
Rust / Code coverage (push) Has been cancelled

This commit is contained in:
Alphonse Paix
2025-09-28 03:37:23 +02:00
parent ac96b3c249
commit 1117d49746
20 changed files with 120 additions and 116 deletions

View File

@@ -33,7 +33,11 @@ fn validate_form(form: &CreatePostForm) -> Result<(), anyhow::Error> {
}
}
#[tracing::instrument(name = "Creating a post", skip(connection_pool, form))]
#[tracing::instrument(
name = "Publishing new blog post",
skip(connection_pool, base_url, form)
fields(title = %form.title)
)]
pub async fn create_post(
State(AppState {
connection_pool,
@@ -79,10 +83,7 @@ pub async fn create_post(
Ok(response)
}
#[tracing::instrument(
name = "Saving new post in the database",
skip(transaction, title, content, author)
)]
#[tracing::instrument(name = "Saving new blog post in the database", skip_all)]
pub async fn insert_post(
transaction: &mut Transaction<'static, Postgres>,
title: &str,
@@ -105,10 +106,7 @@ pub async fn insert_post(
Ok(post_id)
}
#[tracing::instrument(
name = "Creating newsletter for new post",
skip(transaction, post_title, post_id)
)]
#[tracing::instrument(name = "Creating newsletter for new post", skip_all)]
pub async fn create_newsletter(
transaction: &mut Transaction<'static, Postgres>,
base_url: &str,