mgbam commited on
Commit
2cb216c
·
verified ·
1 Parent(s): 87ba598

Create services/metrics.py

Browse files
Files changed (1) hide show
  1. services/metrics.py +7 -0
services/metrics.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from prometheus_client import Counter, start_http_server
2
+
3
+ # HTTP endpoint for Prometheus to scrape
4
+ start_http_server(8001)
5
+
6
+ CHAT_COUNT = Counter("chat_requests_total", "Total chat requests")
7
+ OPTIMIZE_COUNT = Counter("optimize_requests_total", "Total optimize requests")