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:
authorkarthik nayak <knayak@gitlab.com>2023-01-27 14:50:41 +0300
committerkarthik nayak <knayak@gitlab.com>2023-01-27 14:50:41 +0300
commitb1841c6d79f62066335ad4d44efa21f3c5f77c03 (patch)
tree91f2f3e1eb5a77e2bbb5516f2ce068c5d06644b6
parent1272cfa77b7a3960ec1595d7fa9fe5b96246f0df (diff)
parentf349198bec8c1150ccc9548fd0c41078de479a97 (diff)
Merge branch 'pks-housekeeping-fix-data-structure-count-metric-typo' into 'master'
housekeeping: Fix some issues with new data structure metrics See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5298 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
-rw-r--r--internal/git/housekeeping/manager.go2
-rw-r--r--internal/git/housekeeping/optimize_repository.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/internal/git/housekeeping/manager.go b/internal/git/housekeeping/manager.go
index 55f1f24c3..27fd3ed57 100644
--- a/internal/git/housekeeping/manager.go
+++ b/internal/git/housekeeping/manager.go
@@ -70,7 +70,7 @@ func NewManager(promCfg gitalycfgprom.Config, txManager transaction.Manager) *Re
),
dataStructureCount: prometheus.NewHistogramVec(
prometheus.HistogramOpts{
- Name: "gitaly_housekeeping_data_structure_wcount",
+ Name: "gitaly_housekeeping_data_structure_count",
Help: "Total count of the data structures that exist in the repository",
Buckets: prometheus.ExponentialBucketsRange(1, 10_000_000, 16),
},
diff --git a/internal/git/housekeeping/optimize_repository.go b/internal/git/housekeeping/optimize_repository.go
index 74f70d1b5..1238e74f7 100644
--- a/internal/git/housekeeping/optimize_repository.go
+++ b/internal/git/housekeeping/optimize_repository.go
@@ -101,6 +101,8 @@ func (m *RepositoryManager) reportRepositoryInfo(ctx context.Context, info stats
func (m *RepositoryManager) reportDataStructureExistence(dataStructure string, exists bool) {
m.dataStructureExistence.WithLabelValues(dataStructure, strconv.FormatBool(exists)).Inc()
+ // We also report the inverse metric so that it will be visible to clients.
+ m.dataStructureExistence.WithLabelValues(dataStructure, strconv.FormatBool(!exists)).Add(0)
}
func (m *RepositoryManager) reportDataStructureCount(dataStructure string, count uint64) {