Update telemetry
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#[derive(Debug)]
|
||||
pub struct IdempotencyKey(String);
|
||||
|
||||
impl TryFrom<String> for IdempotencyKey {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user