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