diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-06-05 11:31:18 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-06-05 11:31:18 +0300 |
commit | e96f9d00469050d3548ee45928b2a5b6733a3a7d (patch) | |
tree | 25dd18901d9e23e08c275ee6c896c06ae63dfe14 /metrics/metrics.go | |
parent | c877296b468e4a828da27f4fd47c3e17eb7e2e1d (diff) |
Use histograms instead of gagues
Removed test assertion for metric as histograms are not collectors
so we can't really test it. Left the test though as it's still valuable.
Diffstat (limited to 'metrics/metrics.go')
-rw-r--r-- | metrics/metrics.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go index 949ffa1e..7e6d72e1 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -78,13 +78,13 @@ var ( }, []string{"status_code"}) // ServingFileSize metric for file size serving. serving_types: disk and object_storage - ServingFileSize = prometheus.NewGaugeVec(prometheus.GaugeOpts{ + ServingFileSize = prometheus.NewHistogramVec(prometheus.HistogramOpts{ 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{ + ServingTime = prometheus.NewHistogram(prometheus.HistogramOpts{ Name: "gitlab_pages_serving_time", Help: "The time (in seconds) taken to serve a file", }) |