Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix: make kv log extraction easier (#2666)
Kartikeya Hegde577ef1ae1a47
diff --git a/crates/storage_impl/src/redis/kv_store.rs b/crates/storage_impl/src/redis/kv_store.rsindex 32fe21f758..52f58f6a75 100644--- a/crates/storage_impl/src/redis/kv_store.rs+++ b/crates/storage_impl/src/redis/kv_store.rs@@ -107,7 +107,7 @@ wherelet result = async {match op {KvOperation::Hset(value, sql) => {- logger::debug!("Operation: {operation} value: {value:?}");+ logger::debug!(kv_operation= %operation, value = ?value);redis_conn.set_hash_fields(key, value, Some(consts::KV_TTL))@@ -133,7 +133,7 @@ where}KvOperation::HSetNx(field, value, sql) => {- logger::debug!("Operation: {operation} value: {value:?}");+ logger::debug!(kv_operation= %operation, value = ?value);let result = redis_conn.serialize_and_set_hash_field_if_not_exist(@@ -153,7 +153,7 @@ where}KvOperation::SetNx(value, sql) => {- logger::debug!("Operation: {operation} value: {value:?}");+ logger::debug!(kv_operation= %operation, value = ?value);let result = redis_conn.serialize_and_set_key_if_not_exist(key, value, Some(consts::KV_TTL.into()))@@ -178,14 +178,14 @@ whereresult.await.map(|result| {- logger::debug!("KvOperation {operation} succeeded");+ logger::debug!(kv_operation= %operation, status="success");let keyvalue = router_env::opentelemetry::KeyValue::new("operation", operation.clone());metrics::KV_OPERATION_SUCCESSFUL.add(&metrics::CONTEXT, 1, &[keyvalue]);result}).map_err(|err| {- logger::error!("KvOperation for {operation} failed with {err:?}");+ logger::error!(kv_operation = %operation, status="error", error = ?err);let keyvalue = router_env::opentelemetry::KeyValue::new("operation", operation);metrics::KV_OPERATION_FAILED.add(&metrics::CONTEXT, 1, &[keyvalue]);