Adds request latency tracking

Fixes #1
This commit is contained in:
sm
2018-01-24 21:25:15 -08:00
parent 6fa26ec095
commit 70288014ea
4 changed files with 87 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
package metrics
import (
"time"
)
func HTTPLatency(path string, dur time.Duration) {
httpReqLat.WithLabelValues(path).Observe(float64(dur) / float64(time.Millisecond))
}