convert old metrics to prom metrics

This commit is contained in:
bergquist
2017-09-14 14:26:32 +02:00
committed by Carl Bergquist
parent 788f677ed7
commit 2de94d6548
37 changed files with 283 additions and 489 deletions
+3 -3
View File
@@ -19,8 +19,8 @@ import (
"net/http"
"time"
"github.com/grafana/grafana/pkg/metrics"
"github.com/grafana/grafana/pkg/setting"
"github.com/prometheus/client_golang/prometheus"
"gopkg.in/macaron.v1"
)
@@ -35,8 +35,8 @@ func Logger() macaron.Handler {
timeTakenMs := time.Since(start) / time.Millisecond
if timer, ok := c.Data["perfmon.timer"]; ok {
timerTyped := timer.(metrics.Timer)
timerTyped.Update(timeTakenMs)
timerTyped := timer.(prometheus.Summary)
timerTyped.Observe(float64(timeTakenMs))
}
status := rw.Status()