feat(sofiia-console): expose /metrics and add basic ops counters
Expose Prometheus-style metrics endpoint and add counters for send requests, idempotency replays, and cursor pagination calls, including a safe in-process fallback exposition when prometheus_client is unavailable. Made-with: Cursor
This commit is contained in:
11
tests/test_sofiia_metrics.py
Normal file
11
tests/test_sofiia_metrics.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
def test_metrics_endpoint_exposes_sofiia_counters(sofiia_client):
|
||||
r = sofiia_client.get("/metrics")
|
||||
assert r.status_code == 200, r.text
|
||||
body = r.text
|
||||
assert "sofiia_send_requests_total" in body
|
||||
assert "sofiia_idempotency_replays_total" in body
|
||||
assert "sofiia_cursor_requests_total" in body
|
||||
|
||||
Reference in New Issue
Block a user