mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +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_request_reference_id_config: &ConnectorRequestReferenceIdConfig,
|
||||||
connector_http_status_code: Option<u16>,
|
connector_http_status_code: Option<u16>,
|
||||||
external_latency: Option<u128>,
|
external_latency: Option<u128>,
|
||||||
is_latency_header_enabled: Option<bool>,
|
_is_latency_header_enabled: Option<bool>,
|
||||||
) -> RouterResponse<api::PaymentsResponse>
|
) -> RouterResponse<api::PaymentsResponse>
|
||||||
where
|
where
|
||||||
Op: Debug,
|
Op: Debug,
|
||||||
@ -451,13 +451,13 @@ where
|
|||||||
payment_confirm_source.to_string(),
|
payment_confirm_source.to_string(),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
if Some(true) == is_latency_header_enabled {
|
|
||||||
headers.extend(
|
headers.extend(
|
||||||
external_latency
|
external_latency
|
||||||
.map(|latency| vec![(X_HS_LATENCY.to_string(), latency.to_string())])
|
.map(|latency| vec![(X_HS_LATENCY.to_string(), latency.to_string())])
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
let output = Ok(match payment_request {
|
let output = Ok(match payment_request {
|
||||||
Some(_request) => {
|
Some(_request) => {
|
||||||
if payments::is_start_pay(&operation)
|
if payments::is_start_pay(&operation)
|
||||||
|
|||||||
Reference in New Issue
Block a user