Hive
feat(kura): Reduce Kura metrics cardinality
GitHub issue · Closed
Source
tuist/tuist #11025
Updated
Jun 24, 2026
Domains
Kura
No linked issue.
This PR reduces Kura Prometheus cardinality after adding Kura nodes made HTTP and replication metrics a dominant active-series source.
- Keeps Kura HTTP route labels bounded by falling back from raw paths to route templates when Axum matched-route metadata is unavailable.
- Splits client country counts into
kura_http_client_requests_total, sokura_http_requests_totalno longer multiplies route, method, and status by country. - Aggregates HTTP and replication latency histograms without route or peer-target labels, then updates Grafana dashboards and Kura observability docs to match the new metric shape.
How to test locally
mise exec -- cargo test public_http_metrics_exclude_probes_internal_and_unmatched_routesmise exec -- cargo test render_includes_recorded_metricsmise exec -- cargo test route_template_for_path_stabilizes_cache_pathsmise exec -- cargo test dynamic_cache_paths_use_template_route_metric_labelsmise exec -- cargo test unknown_paths_use_a_stable_unmatched_route_metric_labelmise exec -- cargo clippy --locked --all-targets -- -D warningsjq empty infra/grafana-dashboards/tuist-kura.json kura/ops/grafana/dashboards/kura-cluster.jsongit diff --check