Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/internal/upstream/metrics.go')
-rw-r--r--workhorse/internal/upstream/metrics.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/workhorse/internal/upstream/metrics.go b/workhorse/internal/upstream/metrics.go
index 38528056d43..1a11bdc8b53 100644
--- a/workhorse/internal/upstream/metrics.go
+++ b/workhorse/internal/upstream/metrics.go
@@ -101,6 +101,16 @@ var (
},
[]string{"code", "method", "route"},
)
+
+ httpGeoProxiedRequestsTotal = promauto.NewCounterVec(
+ prometheus.CounterOpts{
+ Namespace: namespace,
+ Subsystem: httpSubsystem,
+ Name: "geo_proxied_requests_total",
+ Help: "A counter for Geo proxied requests through workhorse.",
+ },
+ []string{"code", "method", "route"},
+ )
)
func instrumentRoute(next http.Handler, method string, regexpStr string) http.Handler {
@@ -115,3 +125,7 @@ func instrumentRoute(next http.Handler, method string, regexpStr string) http.Ha
return handler
}
+
+func instrumentGeoProxyRoute(next http.Handler, method string, regexpStr string) http.Handler {
+ return promhttp.InstrumentHandlerCounter(httpGeoProxiedRequestsTotal.MustCurryWith(map[string]string{"route": regexpStr}), next)
+}