8000 Update OM content type. · wolph/client_python@283ba23 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit 283ba23

Browse files
committed
Update OM content type.
Per prometheus/OpenMetrics#79 Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
1 parent 5c5c3e2 commit 283ba23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

prometheus_client/exposition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def sample_line(s):
124124
def choose_encoder(accept_header):
125125
accept_header = accept_header or ''
126126
for accepted in accept_header.split(','):
127-
if accepted == 'text/openmetrics; version=0.0.1':
127+
if accepted == 'application/openmetrics-text; version=0.0.1':
128128
return (openmetrics.exposition.generate_latest,
129129
openmetrics.exposition.CONTENT_TYPE_LATEST)
130130
return (generate_latest, CONTENT_TYPE_LATEST)

prometheus_client/openmetrics/exposition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from .. import core
66

7-
CONTENT_TYPE_LATEST = str('text/openmetrics; version=0.0.1; charset=utf-8')
7+
CONTENT_TYPE_LATEST = str('application/openmetrics-text; version=0.0.1; charset=utf-8')
88
'''Content type of the latest OpenMetrics text format'''
99

1010
def generate_latest(registry):

0 commit comments

Comments
 (0)
0