mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(router_env): making metric flow as a trait for extensibility (#797)
This commit is contained in:
		| @ -1,6 +1,9 @@ | ||||
| use super::utils as metric_utils; | ||||
|  | ||||
| pub async fn record_request_time_metric<F, R>(future: F, flow: router_env::Flow) -> R | ||||
| pub async fn record_request_time_metric<F, R>( | ||||
|     future: F, | ||||
|     flow: impl router_env::types::FlowMetric, | ||||
| ) -> R | ||||
| where | ||||
|     F: futures::Future<Output = R>, | ||||
| { | ||||
|  | ||||
| @ -522,7 +522,7 @@ where | ||||
|     fields(request_method, request_url_path) | ||||
| )] | ||||
| pub async fn server_wrap<'a, 'b, A, T, U, Q, F, Fut, E>( | ||||
|     flow: router_env::Flow, | ||||
|     flow: impl router_env::types::FlowMetric, | ||||
|     state: &'b A, | ||||
|     request: &'a HttpRequest, | ||||
|     payload: T, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Nishant Joshi
					Nishant Joshi