File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
2121
2222 "github.com/matttproud/golang_protobuf_extensions/pbutil"
2323 "github.com/prometheus/common/expfmt"
24+ "github.com/prometheus/common/model"
2425
2526 dto "github.com/prometheus/client_model/go"
2627 "github.com/prometheus/prom2json/histogram"
@@ -231,7 +232,7 @@ func ParseReader(in io.Reader, ch chan<- *dto.MetricFamily) error {
231232 // We could do further content-type checks here, but the
232233 // fallback for now will anyway be the text format
233234 // version 0.0.4, so just go for it and see if it works.
234- var parser expfmt.TextParser
235+ parser := expfmt .NewTextParser ( model . UTF8Validation )
235236 metricFamilies , err := parser .TextToMetricFamilies (in )
236237 if err != nil {
237238 return fmt .Errorf ("reading text format failed: %v" , err )
You can’t perform that action at this time.
0 commit comments