mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
fix(analytics): added hs latency to api event for paymentconfirm call (#2787)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: ivor-juspay <138492857+ivor-juspay@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e93f76b916
commit
aab8f6035c
@ -346,7 +346,7 @@ pub fn payments_to_payments_response<R, Op, F: Clone>(
|
||||
connector_request_reference_id_config: &ConnectorRequestReferenceIdConfig,
|
||||
connector_http_status_code: Option<u16>,
|
||||
external_latency: Option<u128>,
|
||||
is_latency_header_enabled: Option<bool>,
|
||||
_is_latency_header_enabled: Option<bool>,
|
||||
) -> RouterResponse<api::PaymentsResponse>
|
||||
where
|
||||
Op: Debug,
|
||||
@ -451,13 +451,13 @@ where
|
||||
payment_confirm_source.to_string(),
|
||||
))
|
||||
}
|
||||
if Some(true) == is_latency_header_enabled {
|
||||
|
||||
headers.extend(
|
||||
external_latency
|
||||
.map(|latency| vec![(X_HS_LATENCY.to_string(), latency.to_string())])
|
||||
.unwrap_or_default(),
|
||||
);
|
||||
}
|
||||
|
||||
let output = Ok(match payment_request {
|
||||
Some(_request) => {
|
||||
if payments::is_start_pay(&operation)
|
||||
|
||||
Reference in New Issue
Block a user