mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	refactor(router): added payment_method to golden log line (#3620)
This commit is contained in:
		| @ -152,6 +152,7 @@ where | ||||
|                     payment_id = Empty, | ||||
|                     merchant_id = Empty, | ||||
|                     connector_name = Empty, | ||||
|                     payment_method = Empty, | ||||
|                     flow = "UNKNOWN" | ||||
|                 ) | ||||
|                 .or_current(), | ||||
|  | ||||
| @ -265,7 +265,7 @@ pub enum CaptureSyncMethod { | ||||
| /// Handle the flow by interacting with connector module | ||||
| /// `connector_request` is applicable only in case if the `CallConnectorAction` is `Trigger` | ||||
| /// In other cases, It will be created if required, even if it is not passed | ||||
| #[instrument(skip_all)] | ||||
| #[instrument(skip_all, fields(payment_method))] | ||||
| pub async fn execute_connector_processing_step< | ||||
|     'b, | ||||
|     'a, | ||||
| @ -285,6 +285,7 @@ where | ||||
| { | ||||
|     // If needed add an error stack as follows | ||||
|     // connector_integration.build_request(req).attach_printable("Failed to build request"); | ||||
|     tracing::Span::current().record("payment_method", &req.payment_method.to_string()); | ||||
|     logger::debug!(connector_request=?connector_request); | ||||
|     let mut router_data = req.clone(); | ||||
|     match call_connector_action { | ||||
|  | ||||
| @ -92,7 +92,13 @@ impl Visit for Storage<'_> { | ||||
|     } | ||||
| } | ||||
|  | ||||
| const PERSISTENT_KEYS: [&str; 4] = ["payment_id", "connector_name", "merchant_id", "flow"]; | ||||
| const PERSISTENT_KEYS: [&str; 5] = [ | ||||
|     "payment_id", | ||||
|     "connector_name", | ||||
|     "merchant_id", | ||||
|     "flow", | ||||
|     "payment_method", | ||||
| ]; | ||||
|  | ||||
| impl<S: Subscriber + for<'a> tracing_subscriber::registry::LookupSpan<'a>> Layer<S> | ||||
|     for StorageSubscription | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sahkal Poddar
					Sahkal Poddar