We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc0bd95 commit cce0fcdCopy full SHA for cce0fcd
src/pkg/scraper/scraper.go
@@ -14,6 +14,7 @@ import (
14
metrics "code.cloudfoundry.org/go-metric-registry"
15
io_prometheus_client "github.com/prometheus/client_model/go"
16
"github.com/prometheus/common/expfmt"
17
+ "github.com/prometheus/common/model"
18
19
"code.cloudfoundry.org/go-loggregator/v9"
20
)
@@ -177,7 +178,7 @@ func (s *Scraper) scrape(target Target) (map[string]*io_prometheus_client.Metric
177
178
return nil, fmt.Errorf("unexpected status code %d: %s", resp.StatusCode, body)
179
}
180
- p := &expfmt.TextParser{}
181
+ p := expfmt.NewTextParser(model.LegacyValidation)
182
res, err := p.TextToMetricFamilies(resp.Body)
183
if err != nil {
184
return nil, err
0 commit comments