feat(analytics): refactor and rewrite authentication related analytics (#7433)

Co-authored-by: Sandeep Kumar <sandeep.kumar@Sandeep-Kumar-LVF93XQXPC.local>
This commit is contained in:
Sandeep Kumar
2025-03-06 16:31:31 +05:30
committed by GitHub
parent ea817060cf
commit 1ff273e137
18 changed files with 199 additions and 194 deletions

View File

@ -909,7 +909,6 @@ impl AnalyticsProvider {
&self,
metric: &AuthEventMetrics,
merchant_id: &common_utils::id_type::MerchantId,
publishable_key: &str,
granularity: Option<Granularity>,
time_range: &TimeRange,
) -> types::MetricsResult<HashSet<(AuthEventMetricsBucketIdentifier, AuthEventMetricRow)>> {
@ -917,14 +916,13 @@ impl AnalyticsProvider {
Self::Sqlx(_pool) => Err(report!(MetricsError::NotImplemented)),
Self::Clickhouse(pool) => {
metric
.load_metrics(merchant_id, publishable_key, granularity, time_range, pool)
.load_metrics(merchant_id, granularity, time_range, pool)
.await
}
Self::CombinedCkh(_sqlx_pool, ckh_pool) | Self::CombinedSqlx(_sqlx_pool, ckh_pool) => {
metric
.load_metrics(
merchant_id,
publishable_key,
granularity,
// Since API events are ckh only use ckh here
time_range,