Update telemetry
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user