From 390bccee36f10085cacc9b3ce961bebe10e32e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Srokosz?= Date: Fri, 10 Jan 2025 17:32:33 +0100 Subject: [PATCH] Fix Prometheus metrics MIME type and bump prometheus-client to 0.21.1 (#1016) --- mwdb/resources/metrics.py | 3 ++- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mwdb/resources/metrics.py b/mwdb/resources/metrics.py index 35854d91a..688890dba 100644 --- a/mwdb/resources/metrics.py +++ b/mwdb/resources/metrics.py @@ -1,4 +1,5 @@ from flask import Response +from prometheus_client import CONTENT_TYPE_LATEST from mwdb.core.capabilities import Capabilities from mwdb.core.metrics import collect @@ -32,5 +33,5 @@ def get(self): metrics = collect() return Response( metrics, - content_type="application/octet-stream", + content_type=CONTENT_TYPE_LATEST, ) diff --git a/requirements.txt b/requirements.txt index df96845f3..75a858184 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,4 +26,4 @@ python-dateutil==2.8.2 pyzipper==0.3.5 pycryptodomex==3.19.1 ssdeep==3.4 -prometheus-client==0.19.0 +prometheus-client==0.21.1