mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
feat(routing): Add audit trail for routing (#8188)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -32,6 +32,7 @@ use crate::{
|
||||
connector_events::events::ConnectorEventsResult,
|
||||
disputes::{filters::DisputeFilterRow, metrics::DisputeMetricRow},
|
||||
outgoing_webhook_event::events::OutgoingWebhookLogsResult,
|
||||
routing_events::events::RoutingEventsResult,
|
||||
sdk_events::events::SdkEventsResult,
|
||||
types::TableEngine,
|
||||
};
|
||||
@ -150,6 +151,7 @@ impl AnalyticsDataSource for ClickhouseClient {
|
||||
| AnalyticsCollection::SdkEventsAnalytics
|
||||
| AnalyticsCollection::ApiEvents
|
||||
| AnalyticsCollection::ConnectorEvents
|
||||
| AnalyticsCollection::RoutingEvents
|
||||
| AnalyticsCollection::ApiEventsAnalytics
|
||||
| AnalyticsCollection::OutgoingWebhookEvent
|
||||
| AnalyticsCollection::ActivePaymentsAnalytics => TableEngine::BasicTree,
|
||||
@ -187,6 +189,7 @@ impl super::api_event::events::ApiLogsFilterAnalytics for ClickhouseClient {}
|
||||
impl super::api_event::filters::ApiEventFilterAnalytics for ClickhouseClient {}
|
||||
impl super::api_event::metrics::ApiEventMetricAnalytics for ClickhouseClient {}
|
||||
impl super::connector_events::events::ConnectorEventLogAnalytics for ClickhouseClient {}
|
||||
impl super::routing_events::events::RoutingEventLogAnalytics for ClickhouseClient {}
|
||||
impl super::outgoing_webhook_event::events::OutgoingWebhookLogsFilterAnalytics
|
||||
for ClickhouseClient
|
||||
{
|
||||
@ -236,6 +239,16 @@ impl TryInto<ConnectorEventsResult> for serde_json::Value {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<RoutingEventsResult> for serde_json::Value {
|
||||
type Error = Report<ParsingError>;
|
||||
|
||||
fn try_into(self) -> Result<RoutingEventsResult, Self::Error> {
|
||||
serde_json::from_value(self).change_context(ParsingError::StructParseFailure(
|
||||
"Failed to parse RoutingEventsResult in clickhouse results",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<PaymentMetricRow> for serde_json::Value {
|
||||
type Error = Report<ParsingError>;
|
||||
|
||||
@ -471,6 +484,7 @@ impl ToSql<ClickhouseClient> for AnalyticsCollection {
|
||||
Self::DisputeSessionized => Ok("sessionizer_dispute".to_string()),
|
||||
Self::ActivePaymentsAnalytics => Ok("active_payments".to_string()),
|
||||
Self::Authentications => Ok("authentications".to_string()),
|
||||
Self::RoutingEvents => Ok("routing_events_audit".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user