fix(admin): metrics endpoint not responding with Content-Type header
The prometheus metrics text format requires `Content-Type` header for correct scraping which fails otherwise. Closes #4271. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
committed by
Steve Chavez
parent
7657607ca5
commit
dfe5ba3863
@@ -1730,6 +1730,7 @@ def test_admin_metrics(defaultenv):
|
||||
with run(env=defaultenv, port=freeport()) as postgrest:
|
||||
response = postgrest.admin.get("/metrics")
|
||||
assert response.status_code == 200
|
||||
assert response.headers["Content-Type"] == "text/plain; charset=utf-8"
|
||||
assert "pgrst_schema_cache_query_time_seconds" in response.text
|
||||
assert 'pgrst_schema_cache_loads_total{status="SUCCESS"}' in response.text
|
||||
assert "pgrst_db_pool_max" in response.text
|
||||
|
||||
Reference in New Issue
Block a user