analytics-ingest: Explicitly set Content-Type returned by the metrics endpoint to the expected value

This commit is contained in:
OatmealDome
2025-08-23 06:57:27 +00:00
parent 1d0b05003b
commit 70d4ba68c9

View File

@@ -148,7 +148,7 @@ def deserialize(report: bytes) -> Dict[str, tuple[Any, DataType]]:
return data
ch = ClickHouseInterface(host="localhost")
#ch = ClickHouseInterface(host="localhost")
def write_to_clickhouse(data: Dict[str, Any]):
@@ -183,6 +183,7 @@ def do_report():
@bottle.get("/metrics")
def do_metrics():
bottle.response.content_type = prometheus_client.CONTENT_TYPE_LATEST
return prometheus_client.generate_latest(prometheus_client.REGISTRY)