fix prometheus metric format
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Stefan Schwarz 2020-12-28 03:16:42 +01:00
parent 2371349e1f
commit ad6088c5f3
1 changed files with 2 additions and 2 deletions

View File

@ -64,9 +64,9 @@ func NewCounter() *Counter {
func (c *Counter) MetricsHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Content-Type", "text/plain")
for i, name := range c.names {
fmt.Fprintf(w, "rc3_stream_count[name=%q] %d\n", name, c.counters[i])
fmt.Fprintf(w, "rc3_stream_count{name=%q} %d\n", name, c.counters[i])
}
fmt.Fprintf(w, "rc3_stream_current[name=\"%d\"] 1\n", c.current)
fmt.Fprintf(w, "rc3_stream_current{name=\"%d\"} 1\n", c.current)
}
func (c *Counter) ScanStdin() {