Skip to content

Commit aaed8a5

Browse files
committed
fix: remove space after comma in openmetrics exposition
OpenMetrics doesn't allow for spaces between labels and prometheus fails with a parsing error. Removing this fixes UTF8 metrics exposition Signed-off-by: Dominik Süß <dominik@suess.wtf>
1 parent 3586355 commit aaed8a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prometheus_client/openmetrics/exposition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def generate_latest(registry, escaping=UNDERSCORES, version="1.0.0"):
7272
if escaping == ALLOWUTF8 and not _is_valid_legacy_metric_name(s.name):
7373
labelstr = escape_metric_name(s.name, escaping)
7474
if s.labels:
75-
labelstr += ', '
75+
labelstr += ','
7676
else:
7777
labelstr = ''
7878

0 commit comments

Comments
 (0)