Hive Hive
Sign in

feat(kura): Reduce Kura metrics cardinality

GitHub issue · Closed

Metadata
Source
tuist/tuist #11025
Updated
Jun 24, 2026
Domains
Kura
Details

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, so kura_http_requests_total no 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_routes
  • mise exec -- cargo test render_includes_recorded_metrics
  • mise exec -- cargo test route_template_for_path_stabilizes_cache_paths
  • mise exec -- cargo test dynamic_cache_paths_use_template_route_metric_labels
  • mise exec -- cargo test unknown_paths_use_a_stable_unmatched_route_metric_label
  • mise exec -- cargo clippy --locked --all-targets -- -D warnings
  • jq empty infra/grafana-dashboards/tuist-kura.json kura/ops/grafana/dashboards/kura-cluster.json
  • git diff --check
Comments
TA
tuist-atlas[bot] Jun 3, 2026

The feature to reduce Kura metrics cardinality is now available in kura@0.6.0. Update to get these improvements.