diff --git a/internal/outpost/proxyv2/handlers.go b/internal/outpost/proxyv2/handlers.go index 4556f15c4..a49d27ab2 100644 --- a/internal/outpost/proxyv2/handlers.go +++ b/internal/outpost/proxyv2/handlers.go @@ -15,10 +15,12 @@ func (ps *ProxyServer) HandlePing(rw http.ResponseWriter, r *http.Request) { rw.WriteHeader(204) after := time.Since(before) metrics.Requests.With(prometheus.Labels{ - "type": "ping", "method": r.Method, + "schema": r.URL.Scheme, "path": r.URL.Path, "host": web.GetHost(r), + "type": "ping", + "user": "", }).Observe(float64(after)) } @@ -28,10 +30,12 @@ func (ps *ProxyServer) HandleStatic(rw http.ResponseWriter, r *http.Request) { http.StripPrefix("/akprox/static", staticFs).ServeHTTP(rw, r) after := time.Since(before) metrics.Requests.With(prometheus.Labels{ - "type": "static", "method": r.Method, + "schema": r.URL.Scheme, "path": r.URL.Path, "host": web.GetHost(r), + "type": "ping", + "user": "", }).Observe(float64(after)) } diff --git a/internal/outpost/proxyv2/metrics/metrics.go b/internal/outpost/proxyv2/metrics/metrics.go index 6a8961414..1d3e1d92c 100644 --- a/internal/outpost/proxyv2/metrics/metrics.go +++ b/internal/outpost/proxyv2/metrics/metrics.go @@ -13,7 +13,7 @@ var ( Requests = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "authentik_outpost_proxy_requests", Help: "The total number of configured providers", - }, []string{"scheme", "type", "method", "path", "host", "user"}) + }, []string{"method", "scheme", "path", "host", "type", "user"}) UpstreamTiming = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "authentik_outpost_proxy_upstream_time", Help: "A summary of the duration we wait for the upstream reply",