diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-06-04 04:56:03 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-06-04 04:56:03 +0300 |
commit | c877296b468e4a828da27f4fd47c3e17eb7e2e1d (patch) | |
tree | 699bfd4507f8645b1f5b9a0dc2a717870a960c88 /metrics/metrics.go | |
parent | 4eedf5c25e17698d03cd71960040f155f51672c9 (diff) |
Add serving time metric for all files
Diffstat (limited to 'metrics/metrics.go')
-rw-r--r-- | metrics/metrics.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go index 1950eb77..949ffa1e 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -82,6 +82,12 @@ var ( Name: "gitlab_pages_serving_file_size", Help: "The size in bytes for each file that has been served", }, []string{"serving_type", "content_type"}) + + // ServingTime metric for time taken to find a file serving it or not found. + ServingTime = prometheus.NewGauge(prometheus.GaugeOpts{ + Name: "gitlab_pages_serving_time", + Help: "The time (in seconds) taken to serve a file", + }) ) // MustRegister collectors with the Prometheus client |