Skip to content

Commit

Permalink
use algod_go_ prefix for prometheus runtime metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
cce committed May 26, 2022
1 parent 5e3dc34 commit 154b911
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion util/metrics/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (rm *RuntimeMetrics) WriteMetric(buf *strings.Builder, parentLabels string)

metrics.Read(rm.samples)
for i, s := range rm.samples {
name := "go" + sanitizePrometheusName(s.Name)
name := "algod_go" + sanitizePrometheusName(s.Name)
desc := rm.descriptions[i]

buf.WriteString("# HELP " + name + " " + desc.Description + "\n")
Expand Down
2 changes: 1 addition & 1 deletion util/metrics/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestRuntimeMetrics(t *testing.T) {
// assert default metrics correctly created
cur := 0
for scanner.Scan() {
curName := "go" + defaultRuntimeMetrics[cur]
curName := "algod_go" + defaultRuntimeMetrics[cur]
curName = strings.ReplaceAll(curName, ":", "_")
curName = strings.ReplaceAll(curName, "-", "_")
curName = strings.ReplaceAll(curName, "/", "_")
Expand Down

0 comments on commit 154b911

Please sign in to comment.