track http status codes in metrics
This commit is contained in:
@@ -7,3 +7,7 @@ import (
|
||||
func HTTPLatency(path string, dur time.Duration) {
|
||||
httpReqLat.WithLabelValues(path).Observe(float64(dur) / float64(time.Millisecond))
|
||||
}
|
||||
|
||||
func HTTPCode(path string, status string) {
|
||||
httpStatus.WithLabelValues(path, status).Inc()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user