Files
git.stella-ops.org/devops/services/tenant/recording-rules.yaml
2025-12-26 18:11:06 +02:00

19 lines
897 B
YAML

# Recording rules supporting tenant audit dashboards/alerts (DEVOPS-TEN-49-001)
apiVersion: 1
groups:
- name: tenant-sli
interval: 30s
rules:
- record: tenant_requests_rate:5m
expr: sum by (tenant, service) (rate(tenant_requests_total[5m]))
- record: tenant_error_rate:5m
expr: sum by (tenant, service) (rate(tenant_requests_total{status=~"5.."}[5m])) /
clamp_min(sum by (tenant, service) (rate(tenant_requests_total[5m])), 1)
- record: tenant_latency_p95:5m
expr: histogram_quantile(0.95, sum by (le, tenant, service) (rate(tenant_requests_duration_seconds_bucket[5m])))
- record: jwks_cache_hit_ratio:5m
expr: rate(auth_jwks_cache_hits_total[5m]) /
clamp_min(rate(auth_jwks_cache_hits_total[5m]) + rate(auth_jwks_cache_misses_total[5m]), 1)
- record: tenant_rate_limit_hits:5m
expr: sum by (tenant, service) (rate(tenant_rate_limit_hits_total[5m]))