@@ -72,13 +72,15 @@ func ResponseFormat(h http.Header) Format {
7272
7373// NewDecoder returns a new decoder based on the given input format. Metric
7474// names are validated based on the provided Format -- if the format requires
75- // escaping, raditional Prometheues validity checking is used. Otherwise, names
75+ // escaping, traditional Prometheus validity checking is used. Otherwise, names
7676// are checked for UTF-8 validity. Supported formats include delimited protobuf
77- // and Prometheus text format. For historical reasons, this decoder fallbacks
78- // to classic text decoding for any other format. This decoder does not fully
79- // support OpenMetrics although it may often succeed due to the similarities
80- // between the formats. This decoder may not support the latest features of
81- // Prometheus text format and is not intended for high-performance applications.
77+ // and Prometheus text format. For historical reasons, this decoder falls back
78+ // to classic text decoding for other legacy formats, but returns an error for
79+ // unsupported formats such as OpenMetrics 2.0. This decoder does not fully
80+ // support OpenMetrics although it may often succeed for OpenMetrics 1.0 due to
81+ // the similarities between the formats. This decoder may not support the latest
82+ // features of Prometheus text format and is not intended for high-performance
83+ // applications.
8284// See: https://github.com/prometheus/common/issues/812
8385func NewDecoder (r io.Reader , format Format ) Decoder {
8486 scheme := model .LegacyValidation
0 commit comments