fix(ops): count failover kinds with suffix

This commit is contained in:
song committed 2026-01-24 01:14:44 +08:00
1 parent fd0370c07a
commit e316a923d4
2 files changed
+2 -2

No files matched your search

@@ -561,7 +561,7 @@ func (c *OpsMetricsCollector) queryAccountSwitchCount(ctx context.Context, start
q := `
SELECT
COALESCE(SUM(CASE
WHEN ev->>'kind' IN ('failover', 'retry_exhausted_failover', 'failover_on_400') THEN 1
WHEN split_part(ev->>'kind', ':', 1) IN ('failover', 'retry_exhausted_failover', 'failover_on_400') THEN 1
ELSE 0
END), 0) AS switch_count
FROM ops_error_logs o