Split up some code for sanity #3

This commit is contained in:
Ian Renton
2025-12-23 11:51:00 +00:00
parent fd246fc17b
commit 61784e8af6
12 changed files with 341 additions and 242 deletions

View File

@@ -0,0 +1,12 @@
import tornado
from prometheus_client.openmetrics.exposition import CONTENT_TYPE_LATEST
from core.prometheus_metrics_handler import get_metrics
# Handler for Prometheus metrics endpoint
class PrometheusMetricsHandler(tornado.web.RequestHandler):
def get(self):
self.write(get_metrics())
self.set_status(200)
self.set_header('Content-Type', CONTENT_TYPE_LATEST)