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

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-06-10 04:40:15 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-06-10 04:40:15 +0300
commitcfce1b8522ce81f7987e940bde29a231b175b61e (patch)
tree3913674c7e1f01bda2be8744f5c5e9c3d47b5ff0 /metrics/metrics.go
parentea75c36b1220b4d741d26a7963b4afb50ebded56 (diff)
Add buckets for histograms
Diffstat (limited to 'metrics/metrics.go')
-rw-r--r--metrics/metrics.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go
index 1266a3aa..b9916258 100644
--- a/metrics/metrics.go
+++ b/metrics/metrics.go
@@ -81,12 +81,15 @@ var (
DiskServingFileSize = prometheus.NewHistogram(prometheus.HistogramOpts{
Name: "gitlab_pages_disk_serving_file_size",
Help: "The size in bytes for each file that has been served",
+ // From 1B to 100MB in *10 increments (1B 10B 100B 1KB 10KB 100KB 1MB 10MB 100MB)
+ Buckets: prometheus.ExponentialBuckets(1.0, 10.0, 9),
})
// ServingTime metric for time taken to find a file serving it or not found.
ServingTime = prometheus.NewHistogram(prometheus.HistogramOpts{
- Name: "gitlab_pages_serving_time",
- Help: "The time (in seconds) taken to serve a file",
+ Name: "gitlab_pages_serving_time",
+ Help: "The time (in seconds) taken to serve a file",
+ Buckets: []float64{0.1, 0.5, 1.0, 2.5, 5.0, 10.0},
})
)