rapl_collector: fix issue with invalid metric name (#2299)

Signed-off-by: Andrei Neagoe <3854672+aneagoe@users.noreply.github.com>
This commit is contained in:
Andrei Neagoe 2022-05-09 15:42:46 +02:00
parent da8b0f694c
commit 0e320e725b
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ func (c *raplCollector) Update(ch chan<- prometheus.Metric) error {
index := strconv.Itoa(rz.Index)
descriptor := prometheus.NewDesc(
prometheus.BuildFQName(namespace, "rapl", rz.Name+"_joules_total"),
prometheus.BuildFQName(namespace, "rapl", SanitizeMetricName(rz.Name+"_joules_total")),
"Current RAPL "+rz.Name+" value in joules",
[]string{"index", "path"}, nil,
)