What It Shows
Analytics is the operator-facing view for understanding how routing is behaving in practice. The page is split into these sections:- Overview
- Gateway Scoring
- Decisions
- Routing Stats
- Logs / Summaries
payment-audit.
Data Sources
The current implementation uses these sources:- Redis for live SR and latency snapshots
- Prometheus for live counters and error-rate tiles
- ClickHouse as the analytics event store and analytics query backend
Scope
Analytics is always merchant-scoped by the authenticated identity:- Bearer JWT requests derive the merchant from the token claims
- API-key requests derive the merchant from the key binding
scope or
merchant_id query params, and changing the merchant selector in the top bar does not widen the
backend query scope.
Connector success-rate history is sourced from stored score_snapshot analytics events, not directly from Redis. Redis remains the live source for current score state. The connector SR chart can be narrowed by:
payment_method_typepayment_method- connector
Generating Demo Traffic
To populate Analytics and Decision Audit with real traffic, use the routing traffic generator. Generate traffic formerchant_space:
- creates or reuses
merchant_space - enables success-rate routing for that merchant through the real
/rule/createor/rule/updateflow - sends
100realPOST /decide-gatewayrequests with mixed payment-method combinations - follows each decision with
POST /update-gateway-scoreusing a mix of successful and failed outcomes - creates and activates a priority-based routing rule through
/routing/createand/routing/activate - sends rule-based
POST /routing/evaluatetraffic so the rule-evaluation analytics path is populated
merchant_space and open /dashboard/analytics or
/dashboard/audit. Analytics reads will resolve the merchant from your authenticated session.
ClickHouse Setup
ClickHouse is part of the standard local runtime stacks. To bring up only ClickHouse and its schema init job:Related Files
website/src/components/pages/AnalyticsPage.tsxwebsite/src/components/layout/Sidebar.tsxsrc/routes/analytics.rssrc/analytics/clickhouse/scripts/src/metrics.rs
Related Docs
- Payment Audit — single-payment timeline lookups.
- ClickHouse Analytics — the underlying ingestion pipeline and schema.
- Dashboard — where these views are surfaced.