Skip to content

Commit

Permalink
rapl_collector: fix issue with invalid metric name (prometheus#2299)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Neagoe <3854672+aneagoe@users.noreply.github.com>
  • Loading branch information
aneagoe committed May 9, 2022
1 parent da8b0f6 commit 0e320e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector/rapl_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit 0e320e7

Please sign in to comment.