mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 21:43:44 +00:00
feat(multiplayer): expose allocator quota metrics
This commit is contained in:
@@ -40,7 +40,7 @@ def verify(directory: Path, service_path: Path) -> None:
|
||||
|
||||
if "kind: PrometheusRule" not in rules:
|
||||
raise ValueError("PrometheusRule resource is missing")
|
||||
for alert in ("CosmicClashControlPlaneAPIP95High", "CosmicClashControlPlaneAPI5xxHigh"):
|
||||
for alert in ("CosmicClashControlPlaneAPIP95High", "CosmicClashControlPlaneAPI5xxHigh", "CosmicClashAllocatorQuotaDenials"):
|
||||
if f"alert: {alert}" not in rules:
|
||||
raise ValueError(f"required alert is missing: {alert}")
|
||||
if "histogram_quantile" not in rules or "cosmic_clash_api_latency_seconds_bucket" not in rules:
|
||||
@@ -49,6 +49,8 @@ def verify(directory: Path, service_path: Path) -> None:
|
||||
raise ValueError("API error alert is not based on the exported counter")
|
||||
if "severity: page" not in rules or "owner: api" not in rules:
|
||||
raise ValueError("alerts must have bounded routing labels")
|
||||
if "cosmic_clash_allocator_quota_denials_total" not in rules or "owner: allocator" not in rules:
|
||||
raise ValueError("allocator quota alert is not based on bounded allocator metrics")
|
||||
routing = rules.split("labels:", 1)[-1].split("annotations:", 1)[0]
|
||||
if "{{ $labels." in routing:
|
||||
raise ValueError("dynamic labels were added to alert routing")
|
||||
|
||||
Reference in New Issue
Block a user