refactor: add instrument to trackers for payment_confirm (#2164)

This commit is contained in:
Kritik Modi
2023-09-14 19:23:50 +05:30
committed by GitHub
parent fb1760b1d8
commit c8049542de
12 changed files with 49 additions and 0 deletions

View File

@ -23,6 +23,7 @@ use diesel_models::{
};
use error_stack::{IntoReport, ResultExt};
use redis_interface::HsetnxReply;
use router_env::{instrument, tracing};
use crate::{
lookup::ReverseLookupInterface,
@ -36,6 +37,7 @@ use crate::{
#[async_trait::async_trait]
impl<T: DatabaseStore> PaymentAttemptInterface for RouterStore<T> {
#[instrument(skip_all)]
async fn insert_payment_attempt(
&self,
payment_attempt: PaymentAttemptNew,
@ -53,6 +55,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for RouterStore<T> {
.map(PaymentAttempt::from_storage_model)
}
#[instrument(skip_all)]
async fn update_payment_attempt_with_attempt_id(
&self,
this: PaymentAttempt,
@ -132,6 +135,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for RouterStore<T> {
.map(PaymentAttempt::from_storage_model)
}
#[instrument(skip_all)]
async fn find_payment_attempt_by_payment_id_merchant_id_attempt_id(
&self,
payment_id: &str,
@ -279,6 +283,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for RouterStore<T> {
#[async_trait::async_trait]
impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
#[instrument(skip_all)]
async fn insert_payment_attempt(
&self,
payment_attempt: PaymentAttemptNew,
@ -403,6 +408,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
}
}
#[instrument(skip_all)]
async fn update_payment_attempt_with_attempt_id(
&self,
this: PaymentAttempt,
@ -616,6 +622,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
}
}
#[instrument(skip_all)]
async fn find_payment_attempt_by_payment_id_merchant_id_attempt_id(
&self,
payment_id: &str,