Skip to content

Commit 70d4ba6

Browse files
committed
analytics-ingest: Explicitly set Content-Type returned by the metrics endpoint to the expected value
1 parent 1d0b050 commit 70d4ba6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

analytics_ingest/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def deserialize(report: bytes) -> Dict[str, tuple[Any, DataType]]:
148148
return data
149149

150150

151-
ch = ClickHouseInterface(host="localhost")
151+
#ch = ClickHouseInterface(host="localhost")
152152

153153

154154
def write_to_clickhouse(data: Dict[str, Any]):
@@ -183,6 +183,7 @@ def do_report():
183183

184184
@bottle.get("/metrics")
185185
def do_metrics():
186+
bottle.response.content_type = prometheus_client.CONTENT_TYPE_LATEST
186187
return prometheus_client.generate_latest(prometheus_client.REGISTRY)
187188

188189

0 commit comments

Comments
 (0)