From 7fef2ff59512a7d6be5ad211a14101b1de3c3262 Mon Sep 17 00:00:00 2001 From: Shankar Singh C Date: Wed, 29 Nov 2023 12:26:12 +0530 Subject: [PATCH] address pr comments --- .../router/src/core/payment_methods/cards.rs | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs index a5ef37547aab..d7013ce253ca 100644 --- a/crates/router/src/core/payment_methods/cards.rs +++ b/crates/router/src/core/payment_methods/cards.rs @@ -236,9 +236,10 @@ pub async fn add_card_to_locker( }) }, &metrics::CARD_ADD_TIME, - &[router_env::opentelemetry::KeyValue::new( - "locker", "basilisk", - )], + &[ + router_env::opentelemetry::KeyValue::new("locker", "basilisk"), + router_env::opentelemetry::KeyValue::new("operation", "add"), + ], ) .await?; logger::debug!("card added to basilisk locker"); @@ -259,7 +260,10 @@ pub async fn add_card_to_locker( metrics::CARD_LOCKER_FAILURES.add( &metrics::CONTEXT, 1, - &[router_env::opentelemetry::KeyValue::new("locker", "rust")], + &[ + router_env::opentelemetry::KeyValue::new("locker", "rust"), + router_env::opentelemetry::KeyValue::new("operation", "add"), + ], ); error }) @@ -321,7 +325,10 @@ pub async fn get_card_from_locker( metrics::CARD_LOCKER_FAILURES.add( &metrics::CONTEXT, 1, - &[router_env::opentelemetry::KeyValue::new("locker", "rust")], + &[ + router_env::opentelemetry::KeyValue::new("locker", "rust"), + router_env::opentelemetry::KeyValue::new("operation", "get"), + ], ); error }) @@ -348,9 +355,10 @@ pub async fn get_card_from_locker( metrics::CARD_LOCKER_FAILURES.add( &metrics::CONTEXT, 1, - &[router_env::opentelemetry::KeyValue::new( - "locker", "basilisk", - )], + &[ + router_env::opentelemetry::KeyValue::new("locker", "basilisk"), + router_env::opentelemetry::KeyValue::new("operation", "get"), + ], ); error })