11 lines
493 B
Python
11 lines
493 B
Python
import unittest
|
|
|
|
from fgai.metrics import prometheus_metrics
|
|
|
|
|
|
class MetricsTests(unittest.TestCase):
|
|
def test_renders_low_cardinality_metrics(self):
|
|
output = prometheus_metrics({"summary": {"total": 10}, "anomaly_summary": {"high": 2}, "baseline": {"sources_ready": 3}, "capabilities": {"graylog_mcp": {"status": "connected", "events_fetched": 9}}})
|
|
self.assertIn('fgai_events_total{kind="total"} 10', output)
|
|
self.assertIn("fgai_graylog_mcp_connected 1", output)
|