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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-08-04 13:56:07 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-08-05 10:04:09 +0300
commit3d4b940d55f12850b7e0556bc54d0c58b951d989 (patch)
tree34eacc498251c57804ba7702d5bad1e6708d291e
parent99c6bcb3f27b2912e898d36e804fe13823e6838f (diff)
praefect: Set up buckets for subtransaction histogram
We're currently using default buckets for the subtransactions histogram, which are not really suited to display the number of subtransactions as they include fractions, which cannot happen in the case of subtransactions. Fix this by defining our own buckets instead. We cannot use exponential buckets here as we also want to include the zero-bucket.
-rw-r--r--internal/praefect/metrics/prometheus.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/praefect/metrics/prometheus.go b/internal/praefect/metrics/prometheus.go
index f06d95614..182834373 100644
--- a/internal/praefect/metrics/prometheus.go
+++ b/internal/praefect/metrics/prometheus.go
@@ -88,9 +88,9 @@ func RegisterTransactionDelay(conf promconfig.Config) (metrics.HistogramVec, err
func RegisterSubtransactionsHistogram() (metrics.Histogram, error) {
subtransactionsHistogram := prometheus.NewHistogram(
prometheus.HistogramOpts{
- Namespace: "gitaly",
- Subsystem: "praefect",
- Name: "subtransactions_per_transaction_total",
+ Name: "gitaly_praefect_subtransactions_per_transaction_total",
+ Help: "The number of subtransactions created for a single registered transaction",
+ Buckets: []float64{0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0},
},
)
return subtransactionsHistogram, prometheus.Register(subtransactionsHistogram)