switch our usage of expfmt.TextParser

This commit is contained in:
Davanum Srinivas
2025-09-08 20:39:17 -04:00
parent bdfca587f4
commit e2e7fa1799
7 changed files with 474 additions and 11 deletions

View File

@@ -722,7 +722,7 @@ type consistencyCheckStatus struct {
}
func parseMetric(r io.Reader, name string) (*dto.MetricFamily, error) {
var parser expfmt.TextParser
parser := expfmt.NewTextParser(model.UTF8Validation)
mfs, err := parser.TextToMetricFamilies(r)
if err != nil {
return nil, err