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 <[email protected]>
  • Loading branch information
aneagoe authored and oblitorum committed Apr 9, 2024
1 parent 17699a0 commit 669f26d
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 669f26d

Please sign in to comment.