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-07 09:21:01 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-09-15 07:49:29 +0300
commit264c22c58941320fdb99150c88b68a3e278b8874 (patch)
tree94bf1dd8c3427729d8e8cb657b99d1bd01b5c124 /metrics
parente854f77d7a8a23bcce20421fbbc1e75b3945f888 (diff)
Add metrics for httprange and trace logs
Add metrics and trace logs Enables meteredRoundTripper to log response data in a Traceln() call. It adds a name to the round tripper for easy logging. Adds two new metrics to be used by the `httprange` package to track number of requests made to object storage. Apply 1 suggestion(s) to 1 file(s) (cherry picked from commit 57a98108c728ba6e6575a95899455d5fac536ae1)
Diffstat (limited to 'metrics')
-rw-r--r--metrics/metrics.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/metrics/metrics.go b/metrics/metrics.go
index 0792a41f..de4206b5 100644
--- a/metrics/metrics.go
+++ b/metrics/metrics.go
@@ -97,6 +97,18 @@ var (
Name: "gitlab_pages_vfs_operations_total",
Help: "The number of VFS operations",
}, []string{"vfs_name", "operation", "success"})
+
+ // ZipFileServingReqTotal is the number of requests made to Object Storage by zip file serving
+ ZipFileServingReqTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
+ Name: "gitlab_pages_httprange_zip_reader_requests_total",
+ Help: "The number of requests made to Object Storage by zip file serving with different status codes",
+ }, []string{"status_code"})
+
+ // ZipFileServingReqDuration is the time it takes to get a response from Object Storage in seconds for zip file servings
+ ZipFileServingReqDuration = prometheus.NewGaugeVec(prometheus.GaugeOpts{
+ Name: "gitlab_pages_httprange_zip_reader_requests_duration",
+ Help: "The time (in seconds) it takes to get a response from the Object Storage provider for zip file serving",
+ }, []string{"status_code"})
)
// MustRegister collectors with the Prometheus client
@@ -117,5 +129,7 @@ func MustRegister() {
DiskServingFileSize,
ServingTime,
VFSOperations,
+ ZipFileServingReqTotal,
+ ZipFileServingReqDuration,
)
}