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

@@ -1,3 +1,4 @@
#[derive(Debug)]
pub struct IdempotencyKey(String);
impl TryFrom<String> for IdempotencyKey {

View File

@@ -16,6 +16,10 @@ struct HeaderPairRecord {
value: Vec<u8>,
}
#[tracing::instrument(
name = "Fetching saved response in database if it exists",
skip(connection_pool)
)]
pub async fn get_saved_response(
connection_pool: &PgPool,
idempotency_key: &IdempotencyKey,
@@ -53,6 +57,7 @@ pub async fn get_saved_response(
}
}
#[tracing::instrument(name = "Saving response in database", skip(transaction, response))]
pub async fn save_response(
mut transaction: Transaction<'static, Postgres>,
idempotency_key: &IdempotencyKey,