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

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2020-03-27 23:37:38 +0300
committerJohn Cai <jcai@gitlab.com>2020-03-28 04:00:52 +0300
commit130dc9cce7dc264167ccb13b2ddaabc317b71c17 (patch)
treeeacd663c54a81db0bf71e36df30a0577e451b6c6
parent7c116ace7f1626cd8bdcd0ca9260a7d13488d6c6 (diff)
Enable client prometheus histogram
In Praefect we want to instrument the client latency of requests going to the internal gitaly nodes. To do so, we must enable the client histogram explicitly.
-rw-r--r--changelogs/unreleased/jc-enable-client-histogram.yml5
-rw-r--r--internal/config/prometheus/config.go3
2 files changed, 8 insertions, 0 deletions
diff --git a/changelogs/unreleased/jc-enable-client-histogram.yml b/changelogs/unreleased/jc-enable-client-histogram.yml
new file mode 100644
index 000000000..e121cb1b9
--- /dev/null
+++ b/changelogs/unreleased/jc-enable-client-histogram.yml
@@ -0,0 +1,5 @@
+---
+title: Enable client prometheus histogram
+merge_request: 1987
+author:
+type: added
diff --git a/internal/config/prometheus/config.go b/internal/config/prometheus/config.go
index 2c3199fca..08c4d8703 100644
--- a/internal/config/prometheus/config.go
+++ b/internal/config/prometheus/config.go
@@ -23,6 +23,9 @@ func (c *Config) Configure() {
grpc_prometheus.EnableHandlingTimeHistogram(func(histogramOpts *prometheus.HistogramOpts) {
histogramOpts.Buckets = c.GRPCLatencyBuckets
})
+ grpc_prometheus.EnableClientHandlingTimeHistogram(func(histogramOpts *prometheus.HistogramOpts) {
+ histogramOpts.Buckets = c.GRPCLatencyBuckets
+ })
limithandler.EnableAcquireTimeHistogram(c.GRPCLatencyBuckets)
}