Fix label order for http_requests_total
the order of http_requests_total was shown to be incorrect in
testing. This fixes the order as per
http_request_duration_seconds.
@@ -25,7 +25,8 @@ type PrometheusServiceNotifier struct {
func (psn PrometheusServiceNotifier) Notify(method string, URL string, originalURL string, statusCode int, duration time.Duration) {
code := fmt.Sprintf("%d", statusCode)
path := urlToLabel(URL)
- psn.ServiceMetrics.Counter.WithLabelValues(code, method, path).Inc()
+
+ psn.ServiceMetrics.Counter.WithLabelValues(method, path, code).Inc()
psn.ServiceMetrics.Histogram.WithLabelValues(method, path, code).Observe(duration.Seconds())
}
