Skip to content

Commit 173be7c

Browse files
committed
xpumanager sidecar: use NewTextParser
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
1 parent c8a96e8 commit 173be7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/xpumanager_sidecar/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import (
3737

3838
io_prometheus_client "github.com/prometheus/client_model/go"
3939
"github.com/prometheus/common/expfmt"
40+
"github.com/prometheus/common/model"
4041
)
4142

4243
type invalidEntryErr struct{}
@@ -183,7 +184,7 @@ func processMetricsLabels(labels []*io_prometheus_client.LabelPair, allowNonSubd
183184
func (xms *xpuManagerSidecar) GetTopologyFromXPUMMetrics(data []byte) (topologyInfos []xpuManagerTopologyMatrixCell) {
184185
reader := bytes.NewReader(data)
185186

186-
var parser expfmt.TextParser
187+
parser := expfmt.NewTextParser(model.LegacyValidation)
187188
families, err := parser.TextToMetricFamilies(reader)
188189

189190
if err != nil {

0 commit comments

Comments
 (0)