2018-01-21 14:50:32 -08:00
|
|
|
package metrics
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func HTTPLatency(path string, dur time.Duration) {
|
|
|
|
httpReqLat.WithLabelValues(path).Observe(float64(dur) / float64(time.Millisecond))
|
|
|
|
}
|
2018-01-26 18:05:28 -08:00
|
|
|
|
|
|
|
func HTTPCode(path string, status string) {
|
|
|
|
httpStatus.WithLabelValues(path, status).Inc()
|
|
|
|
}
|