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

@@ -15,6 +15,7 @@ use uuid::Uuid;
const NUM_PER_PAGE: i64 = 3;
#[tracing::instrument(name = "Fetching most recent posts from database", skip_all)]
pub async fn list_posts(
State(AppState {
connection_pool, ..
@@ -67,6 +68,7 @@ pub struct PostParams {
origin: Option<Uuid>,
}
#[tracing::instrument(name = "Fetching post from database", skip(connection_pool, origin))]
pub async fn see_post(
State(AppState {
connection_pool, ..
@@ -94,6 +96,7 @@ pub async fn see_post(
}
}
#[tracing::instrument(name = "Mark email notification as opened", skip(connection_pool))]
async fn mark_email_as_opened(connection_pool: &PgPool, email_id: Uuid) -> Result<(), AppError> {
sqlx::query!(
"UPDATE notifications_delivered SET opened = TRUE WHERE email_id = $1",
@@ -129,6 +132,7 @@ pub struct LoadMoreParams {
page: i64,
}
#[tracing::instrument(name = "Fetching next posts in the database", skip(connection_pool))]
pub async fn load_more(
State(AppState {
connection_pool, ..