You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The openmetrics format cannot be selected using the Accept: application/openmetrics-text header, because there is the extra header key in the beginning in asgi.py:make_asgi_app which I believe is incorrect. Compare with the accept_encoding_header just below. https://github.com/prometheus/client_python/blob/master/prometheus_client/asgi.py#L15:
# Accept header key here:accept_header="Accept: "+",".join([
value.decode("utf8") for (name, value) inscope.get('headers')
ifname.decode("utf8").lower() =='accept'
])
# No header key here:accept_encoding_header=",".join([
value.decode("utf8") for (name, value) inscope.get('headers')
ifname.decode("utf8").lower() =='accept-encoding'
])
The condition in exposition.py is thus comparing the full header:
accepted.split(';')[0].strip() results to Accept: application/openmetrics-text.
Uh oh!
There was an error while loading. Please reload this page.
The openmetrics format cannot be selected using the
Accept: application/openmetrics-text
header, because there is the extra header key in the beginning inasgi.py:make_asgi_app
which I believe is incorrect. Compare with theaccept_encoding_header
just below.https://github.com/prometheus/client_python/blob/master/prometheus_client/asgi.py#L15:
The condition in
exposition.py
is thus comparing the full header:accepted.split(';')[0].strip()
results toAccept: application/openmetrics-text
.The text was updated successfully, but these errors were encountered: