diff --git a/prometheus_client/parser.py b/prometheus_client/parser.py index 9115659b..fe9db1c0 100644 --- a/prometheus_client/parser.py +++ b/prometheus_client/parser.py @@ -195,7 +195,7 @@ def build_metric(name, documentation, typ, samples): allowed_names = { 'counter': [''], 'gauge': [''], - 'summary': ['_count', '_sum', ''], + 'summary': ['_count', '_sum', '_max', ''], 'histogram': ['_count', '_sum', '_bucket'], }.get(typ, ['']) allowed_names = [name + n for n in allowed_names] diff --git a/tests/test_parser.py b/tests/test_parser.py index 0a340e07..7070bac3 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -207,6 +207,7 @@ def test_roundtrip(self): go_gc_duration_seconds{quantile="1"} 0.021383540000000003 go_gc_duration_seconds_sum 56.12904785 go_gc_duration_seconds_count 7476.0 +go_gc_duration_seconds_max 0.0 # HELP go_goroutines Number of goroutines that currently exist. # TYPE go_goroutines gauge go_goroutines 166.0