mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
feat(analytics): Add metrics, filters and APIs for Analytics v2 Dashboard - Payments Page (#5870)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sampras Lopes <Sampras.lopes@juspay.in> Co-authored-by: Sampras Lopes <lsampras@pm.me>
This commit is contained in:
@ -130,9 +130,12 @@ impl AnalyticsDataSource for ClickhouseClient {
|
||||
fn get_table_engine(table: AnalyticsCollection) -> TableEngine {
|
||||
match table {
|
||||
AnalyticsCollection::Payment
|
||||
| AnalyticsCollection::PaymentSessionized
|
||||
| AnalyticsCollection::Refund
|
||||
| AnalyticsCollection::RefundSessionized
|
||||
| AnalyticsCollection::FraudCheck
|
||||
| AnalyticsCollection::PaymentIntent
|
||||
| AnalyticsCollection::PaymentIntentSessionized
|
||||
| AnalyticsCollection::Dispute => {
|
||||
TableEngine::CollapsingMergeTree { sign: "sign_flag" }
|
||||
}
|
||||
@ -423,13 +426,16 @@ impl ToSql<ClickhouseClient> for AnalyticsCollection {
|
||||
fn to_sql(&self, _table_engine: &TableEngine) -> error_stack::Result<String, ParsingError> {
|
||||
match self {
|
||||
Self::Payment => Ok("payment_attempts".to_string()),
|
||||
Self::PaymentSessionized => Ok("sessionizer_payment_attempts".to_string()),
|
||||
Self::Refund => Ok("refunds".to_string()),
|
||||
Self::RefundSessionized => Ok("sessionizer_refunds".to_string()),
|
||||
Self::FraudCheck => Ok("fraud_check".to_string()),
|
||||
Self::SdkEvents => Ok("sdk_events_audit".to_string()),
|
||||
Self::SdkEventsAnalytics => Ok("sdk_events".to_string()),
|
||||
Self::ApiEvents => Ok("api_events_audit".to_string()),
|
||||
Self::ApiEventsAnalytics => Ok("api_events".to_string()),
|
||||
Self::PaymentIntent => Ok("payment_intents".to_string()),
|
||||
Self::PaymentIntentSessionized => Ok("sessionizer_payment_intents".to_string()),
|
||||
Self::ConnectorEvents => Ok("connector_events_audit".to_string()),
|
||||
Self::OutgoingWebhookEvent => Ok("outgoing_webhook_events_audit".to_string()),
|
||||
Self::Dispute => Ok("dispute".to_string()),
|
||||
|
||||
Reference in New Issue
Block a user