chore(analytics): adding status code to connector Kafka events (#3393)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sampras lopes <lsampras@pm.me>
This commit is contained in:
harsh-sharma-juspay
2024-01-30 12:43:56 +05:30
committed by GitHub
parent d91da89065
commit d6807abba4
2 changed files with 11 additions and 1 deletions

View File

@ -18,6 +18,7 @@ pub struct ConnectorEvent {
created_at: i128,
request_id: String,
latency: u128,
status_code: u16,
}
impl ConnectorEvent {
@ -33,6 +34,7 @@ impl ConnectorEvent {
merchant_id: String,
request_id: Option<&RequestId>,
latency: u128,
status_code: u16,
) -> Self {
Self {
connector_name,
@ -52,6 +54,7 @@ impl ConnectorEvent {
.map(|i| i.as_hyphenated().to_string())
.unwrap_or("NO_REQUEST_ID".to_string()),
latency,
status_code,
}
}
}