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-09-21 09:01:18 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-09-24 03:22:45 +0300
commita451e2b0683d46e2ce2d7a92181eb4379dddf866 (patch)
tree5548742c7f69b93eaef9ac1d56b02cdb5cc30201 /metrics
parent27adbbac6de8473a78b39799cef2d8873beef91a (diff)
Add Name to the VFS interface to use with metrics
Diffstat (limited to 'metrics')
-rw-r--r--metrics/metrics.go16
1 files changed, 4 insertions, 12 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go
index 0f532144..4754bfb2 100644
--- a/metrics/metrics.go
+++ b/metrics/metrics.go
@@ -78,21 +78,13 @@ var (
Help: "The time (in seconds) it takes to get a response from the GitLab domains API",
}, []string{"status_code"})
- // DiskServingFileSize metric for file size serving.
- DiskServingFileSize = prometheus.NewHistogram(prometheus.HistogramOpts{
+ // VFSServingFileSize metric for file size serving. Includes a vfs_name (local or zip).
+ VFSServingFileSize = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: "gitlab_pages_disk_serving_file_size_bytes",
Help: "The size in bytes for each file that has been served",
// From 1B to 100MB in *10 increments (1 10 100 1,000 10,000 100,000 1'000,000 10'000,000 100'000,000)
Buckets: prometheus.ExponentialBuckets(1.0, 10.0, 9),
- })
-
- // ZipServingFileSize metric for file size serving.
- ZipServingFileSize = prometheus.NewHistogram(prometheus.HistogramOpts{
- Name: "gitlab_pages_zip_serving_file_size_bytes",
- Help: "The size in bytes for each file that has been served",
- // From 1B to 100MB in *10 increments (1 10 100 1,000 10,000 100,000 1'000,000 10'000,000 100'000,000)
- Buckets: prometheus.ExponentialBuckets(1.0, 10.0, 9),
- })
+ }, []string{"vfs_name"})
// ServingTime metric for time taken to find a file serving it or not found.
ServingTime = prometheus.NewHistogram(prometheus.HistogramOpts{
@@ -137,7 +129,7 @@ func MustRegister() {
DomainsSourceFailures,
ServerlessRequests,
ServerlessLatency,
- DiskServingFileSize,
+ VFSServingFileSize,
ServingTime,
VFSOperations,
ObjectStorageBackendReqTotal,