diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs index 39bc54fa157..f005920c24f 100644 --- a/crates/router/src/core/payment_methods/cards.rs +++ b/crates/router/src/core/payment_methods/cards.rs @@ -2855,6 +2855,14 @@ impl TempLockerCardSupport { ) .await?; metrics::TOKENIZED_DATA_COUNT.add(&metrics::CONTEXT, 1, &[]); + metrics::TASKS_ADDED_COUNT.add( + &metrics::CONTEXT, + 1, + &[metrics::request::add_attributes( + "flow", + "DeleteTokenizeData", + )], + ); Ok(card) } } diff --git a/crates/router/src/core/payment_methods/vault.rs b/crates/router/src/core/payment_methods/vault.rs index 003d13ab483..59be4087eaa 100644 --- a/crates/router/src/core/payment_methods/vault.rs +++ b/crates/router/src/core/payment_methods/vault.rs @@ -984,14 +984,6 @@ pub async fn start_tokenize_data_workflow( .clone() .finish_with_status(db.as_scheduler(), format!("COMPLETED_BY_PT_{id}")) .await?; - metrics::TASKS_ADDED_COUNT.add( - &metrics::CONTEXT, - 1, - &[metrics::request::add_attributes( - "flow", - "DeleteTokenizeData", - )], - ); } Err(err) => { logger::error!("Err: Deleting Card From Locker : {:?}", err);