Skip to content

Commit 9b6272e

Browse files
authored
align with PR #1580 (#1749)
Signed-off-by: Etai Lev Ran <elevran@gmail.com>
1 parent 22e2dbf commit 9b6272e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/epp/datalayer/metrics/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"time"
2525

2626
"github.com/prometheus/common/expfmt"
27+
"github.com/prometheus/common/model"
2728

2829
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/datalayer"
2930
)
@@ -83,7 +84,7 @@ func (cl *client) Get(ctx context.Context, target *url.URL, ep datalayer.Address
8384
return nil, fmt.Errorf("unexpected status code from %s: %v", ep.GetNamespacedName(), resp.StatusCode)
8485
}
8586

86-
parser := expfmt.TextParser{}
87+
parser := expfmt.NewTextParser(model.LegacyValidation)
8788
metricFamilies, err := parser.TextToMetricFamilies(resp.Body)
8889
if err != nil {
8990
return nil, err

0 commit comments

Comments
 (0)