Skip to content

Commit 61e7b73

Browse files
committed
Fix improperly placed label "error" in the exposed metrics
mtr_runs_total{... tests="10",tos="0"error=""} 1 1740573735014 Fixes GH#32
1 parent 0d1ffaa commit 61e7b73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/job/prometheus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (c *Collector) ServeHTTP(w http.ResponseWriter, r *http.Request) {
6969

7070
for k, v := range job.Runs {
7171
fmt.Fprintf(w, "mtr_runs_total{%s%s} %d %d\n",
72-
l, fmt.Sprintf("error=%q", k), v, tsMs)
72+
l, fmt.Sprintf(",error=%q", k), v, tsMs)
7373
}
7474

7575
fmt.Fprintf(w, "mtr_report_duration_seconds{%s} %f %d\n",

0 commit comments

Comments
 (0)