Skip to content

Commit 69d77a0

Browse files
authored
Cleanup compactor metrics description (#2567)
* Fixed cortex_compactor_garbage_collected_blocks_total metric help Signed-off-by: Marco Pracucci <marco@pracucci.com> * Removed 'TSDB Syncer:' prefix from metrics help Signed-off-by: Marco Pracucci <marco@pracucci.com> * Fixed unit tests Signed-off-by: Marco Pracucci <marco@pracucci.com>
1 parent 6b349a7 commit 69d77a0

File tree

3 files changed

+53
-53
lines changed

3 files changed

+53
-53
lines changed

pkg/compactor/compactor_test.go

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -111,59 +111,59 @@ func TestCompactor_ShouldDoNothingOnNoUserBlocks(t *testing.T) {
111111
# HELP cortex_compactor_runs_failed_total Total number of compaction runs failed.
112112
cortex_compactor_runs_failed_total 0
113113
114-
# HELP cortex_compactor_garbage_collected_blocks_total TSDB Syncer: Total number of deleted blocks by compactor.
114+
# HELP cortex_compactor_garbage_collected_blocks_total Total number of blocks marked for deletion by compactor.
115115
# TYPE cortex_compactor_garbage_collected_blocks_total counter
116116
cortex_compactor_garbage_collected_blocks_total 0
117117
118-
# HELP cortex_compactor_garbage_collection_duration_seconds TSDB Syncer: Time it took to perform garbage collection iteration.
118+
# HELP cortex_compactor_garbage_collection_duration_seconds Time it took to perform garbage collection iteration.
119119
# TYPE cortex_compactor_garbage_collection_duration_seconds histogram
120120
cortex_compactor_garbage_collection_duration_seconds_bucket{le="+Inf"} 0
121121
cortex_compactor_garbage_collection_duration_seconds_sum 0
122122
cortex_compactor_garbage_collection_duration_seconds_count 0
123123
124-
# HELP cortex_compactor_garbage_collection_failures_total TSDB Syncer: Total number of failed garbage collection operations.
124+
# HELP cortex_compactor_garbage_collection_failures_total Total number of failed garbage collection operations.
125125
# TYPE cortex_compactor_garbage_collection_failures_total counter
126126
cortex_compactor_garbage_collection_failures_total 0
127127
128-
# HELP cortex_compactor_garbage_collection_total TSDB Syncer: Total number of garbage collection operations.
128+
# HELP cortex_compactor_garbage_collection_total Total number of garbage collection operations.
129129
# TYPE cortex_compactor_garbage_collection_total counter
130130
cortex_compactor_garbage_collection_total 0
131131
132-
# HELP cortex_compactor_meta_sync_consistency_delay_seconds TSDB Syncer: Configured consistency delay in seconds.
132+
# HELP cortex_compactor_meta_sync_consistency_delay_seconds Configured consistency delay in seconds.
133133
# TYPE cortex_compactor_meta_sync_consistency_delay_seconds gauge
134134
cortex_compactor_meta_sync_consistency_delay_seconds 0
135135
136-
# HELP cortex_compactor_meta_sync_duration_seconds TSDB Syncer: Duration of the blocks metadata synchronization in seconds.
136+
# HELP cortex_compactor_meta_sync_duration_seconds Duration of the blocks metadata synchronization in seconds.
137137
# TYPE cortex_compactor_meta_sync_duration_seconds histogram
138138
cortex_compactor_meta_sync_duration_seconds_bucket{le="+Inf"} 0
139139
cortex_compactor_meta_sync_duration_seconds_sum 0
140140
cortex_compactor_meta_sync_duration_seconds_count 0
141141
142-
# HELP cortex_compactor_meta_sync_failures_total TSDB Syncer: Total blocks metadata synchronization failures.
142+
# HELP cortex_compactor_meta_sync_failures_total Total blocks metadata synchronization failures.
143143
# TYPE cortex_compactor_meta_sync_failures_total counter
144144
cortex_compactor_meta_sync_failures_total 0
145145
146-
# HELP cortex_compactor_meta_syncs_total TSDB Syncer: Total blocks metadata synchronization attempts.
146+
# HELP cortex_compactor_meta_syncs_total Total blocks metadata synchronization attempts.
147147
# TYPE cortex_compactor_meta_syncs_total counter
148148
cortex_compactor_meta_syncs_total 0
149149
150-
# HELP cortex_compactor_group_compaction_runs_completed_total TSDB Syncer: Total number of group completed compaction runs. This also includes compactor group runs that resulted with no compaction.
150+
# HELP cortex_compactor_group_compaction_runs_completed_total Total number of group completed compaction runs. This also includes compactor group runs that resulted with no compaction.
151151
# TYPE cortex_compactor_group_compaction_runs_completed_total counter
152152
cortex_compactor_group_compaction_runs_completed_total 0
153153
154-
# HELP cortex_compactor_group_compaction_runs_started_total TSDB Syncer: Total number of group compaction attempts.
154+
# HELP cortex_compactor_group_compaction_runs_started_total Total number of group compaction attempts.
155155
# TYPE cortex_compactor_group_compaction_runs_started_total counter
156156
cortex_compactor_group_compaction_runs_started_total 0
157157
158-
# HELP cortex_compactor_group_compactions_failures_total TSDB Syncer: Total number of failed group compactions.
158+
# HELP cortex_compactor_group_compactions_failures_total Total number of failed group compactions.
159159
# TYPE cortex_compactor_group_compactions_failures_total counter
160160
cortex_compactor_group_compactions_failures_total 0
161161
162-
# HELP cortex_compactor_group_compactions_total TSDB Syncer: Total number of group compaction attempts that resulted in a new block.
162+
# HELP cortex_compactor_group_compactions_total Total number of group compaction attempts that resulted in a new block.
163163
# TYPE cortex_compactor_group_compactions_total counter
164164
cortex_compactor_group_compactions_total 0
165165
166-
# HELP cortex_compactor_group_vertical_compactions_total TSDB Syncer: Total number of group compaction attempts that resulted in a new block based on overlapping blocks.
166+
# HELP cortex_compactor_group_vertical_compactions_total Total number of group compaction attempts that resulted in a new block based on overlapping blocks.
167167
# TYPE cortex_compactor_group_vertical_compactions_total counter
168168
cortex_compactor_group_vertical_compactions_total 0
169169
@@ -224,59 +224,59 @@ func TestCompactor_ShouldRetryOnFailureWhileDiscoveringUsersFromBucket(t *testin
224224
# HELP cortex_compactor_runs_failed_total Total number of compaction runs failed.
225225
cortex_compactor_runs_failed_total 1
226226
227-
# HELP cortex_compactor_garbage_collected_blocks_total TSDB Syncer: Total number of deleted blocks by compactor.
227+
# HELP cortex_compactor_garbage_collected_blocks_total Total number of blocks marked for deletion by compactor.
228228
# TYPE cortex_compactor_garbage_collected_blocks_total counter
229229
cortex_compactor_garbage_collected_blocks_total 0
230230
231-
# HELP cortex_compactor_garbage_collection_duration_seconds TSDB Syncer: Time it took to perform garbage collection iteration.
231+
# HELP cortex_compactor_garbage_collection_duration_seconds Time it took to perform garbage collection iteration.
232232
# TYPE cortex_compactor_garbage_collection_duration_seconds histogram
233233
cortex_compactor_garbage_collection_duration_seconds_bucket{le="+Inf"} 0
234234
cortex_compactor_garbage_collection_duration_seconds_sum 0
235235
cortex_compactor_garbage_collection_duration_seconds_count 0
236236
237-
# HELP cortex_compactor_garbage_collection_failures_total TSDB Syncer: Total number of failed garbage collection operations.
237+
# HELP cortex_compactor_garbage_collection_failures_total Total number of failed garbage collection operations.
238238
# TYPE cortex_compactor_garbage_collection_failures_total counter
239239
cortex_compactor_garbage_collection_failures_total 0
240240
241-
# HELP cortex_compactor_garbage_collection_total TSDB Syncer: Total number of garbage collection operations.
241+
# HELP cortex_compactor_garbage_collection_total Total number of garbage collection operations.
242242
# TYPE cortex_compactor_garbage_collection_total counter
243243
cortex_compactor_garbage_collection_total 0
244244
245-
# HELP cortex_compactor_meta_sync_consistency_delay_seconds TSDB Syncer: Configured consistency delay in seconds.
245+
# HELP cortex_compactor_meta_sync_consistency_delay_seconds Configured consistency delay in seconds.
246246
# TYPE cortex_compactor_meta_sync_consistency_delay_seconds gauge
247247
cortex_compactor_meta_sync_consistency_delay_seconds 0
248248
249-
# HELP cortex_compactor_meta_sync_duration_seconds TSDB Syncer: Duration of the blocks metadata synchronization in seconds.
249+
# HELP cortex_compactor_meta_sync_duration_seconds Duration of the blocks metadata synchronization in seconds.
250250
# TYPE cortex_compactor_meta_sync_duration_seconds histogram
251251
cortex_compactor_meta_sync_duration_seconds_bucket{le="+Inf"} 0
252252
cortex_compactor_meta_sync_duration_seconds_sum 0
253253
cortex_compactor_meta_sync_duration_seconds_count 0
254254
255-
# HELP cortex_compactor_meta_sync_failures_total TSDB Syncer: Total blocks metadata synchronization failures.
255+
# HELP cortex_compactor_meta_sync_failures_total Total blocks metadata synchronization failures.
256256
# TYPE cortex_compactor_meta_sync_failures_total counter
257257
cortex_compactor_meta_sync_failures_total 0
258258
259-
# HELP cortex_compactor_meta_syncs_total TSDB Syncer: Total blocks metadata synchronization attempts.
259+
# HELP cortex_compactor_meta_syncs_total Total blocks metadata synchronization attempts.
260260
# TYPE cortex_compactor_meta_syncs_total counter
261261
cortex_compactor_meta_syncs_total 0
262262
263-
# HELP cortex_compactor_group_compaction_runs_completed_total TSDB Syncer: Total number of group completed compaction runs. This also includes compactor group runs that resulted with no compaction.
263+
# HELP cortex_compactor_group_compaction_runs_completed_total Total number of group completed compaction runs. This also includes compactor group runs that resulted with no compaction.
264264
# TYPE cortex_compactor_group_compaction_runs_completed_total counter
265265
cortex_compactor_group_compaction_runs_completed_total 0
266266
267-
# HELP cortex_compactor_group_compaction_runs_started_total TSDB Syncer: Total number of group compaction attempts.
267+
# HELP cortex_compactor_group_compaction_runs_started_total Total number of group compaction attempts.
268268
# TYPE cortex_compactor_group_compaction_runs_started_total counter
269269
cortex_compactor_group_compaction_runs_started_total 0
270270
271-
# HELP cortex_compactor_group_compactions_failures_total TSDB Syncer: Total number of failed group compactions.
271+
# HELP cortex_compactor_group_compactions_failures_total Total number of failed group compactions.
272272
# TYPE cortex_compactor_group_compactions_failures_total counter
273273
cortex_compactor_group_compactions_failures_total 0
274274
275-
# HELP cortex_compactor_group_compactions_total TSDB Syncer: Total number of group compaction attempts that resulted in a new block.
275+
# HELP cortex_compactor_group_compactions_total Total number of group compaction attempts that resulted in a new block.
276276
# TYPE cortex_compactor_group_compactions_total counter
277277
cortex_compactor_group_compactions_total 0
278278
279-
# HELP cortex_compactor_group_vertical_compactions_total TSDB Syncer: Total number of group compaction attempts that resulted in a new block based on overlapping blocks.
279+
# HELP cortex_compactor_group_vertical_compactions_total Total number of group compaction attempts that resulted in a new block based on overlapping blocks.
280280
# TYPE cortex_compactor_group_vertical_compactions_total counter
281281
cortex_compactor_group_vertical_compactions_total 0
282282

pkg/compactor/syncer_metrics.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,57 +32,57 @@ func newSyncerMetrics(reg prometheus.Registerer) *syncerMetrics {
3232

3333
m.metaSync = prometheus.NewCounter(prometheus.CounterOpts{
3434
Name: "cortex_compactor_meta_syncs_total",
35-
Help: "TSDB Syncer: Total blocks metadata synchronization attempts.",
35+
Help: "Total blocks metadata synchronization attempts.",
3636
})
3737
m.metaSyncFailures = prometheus.NewCounter(prometheus.CounterOpts{
3838
Name: "cortex_compactor_meta_sync_failures_total",
39-
Help: "TSDB Syncer: Total blocks metadata synchronization failures.",
39+
Help: "Total blocks metadata synchronization failures.",
4040
})
4141
m.metaSyncDuration = util.NewHistogramDataCollector(prometheus.NewDesc(
4242
"cortex_compactor_meta_sync_duration_seconds",
43-
"TSDB Syncer: Duration of the blocks metadata synchronization in seconds.",
43+
"Duration of the blocks metadata synchronization in seconds.",
4444
nil, nil))
4545
m.metaSyncConsistencyDelay = prometheus.NewGauge(prometheus.GaugeOpts{
4646
Name: "cortex_compactor_meta_sync_consistency_delay_seconds",
47-
Help: "TSDB Syncer: Configured consistency delay in seconds.",
47+
Help: "Configured consistency delay in seconds.",
4848
})
4949

5050
m.garbageCollectedBlocks = prometheus.NewCounter(prometheus.CounterOpts{
5151
Name: "cortex_compactor_garbage_collected_blocks_total",
52-
Help: "TSDB Syncer: Total number of deleted blocks by compactor.",
52+
Help: "Total number of blocks marked for deletion by compactor.",
5353
})
5454
m.garbageCollections = prometheus.NewCounter(prometheus.CounterOpts{
5555
Name: "cortex_compactor_garbage_collection_total",
56-
Help: "TSDB Syncer: Total number of garbage collection operations.",
56+
Help: "Total number of garbage collection operations.",
5757
})
5858
m.garbageCollectionFailures = prometheus.NewCounter(prometheus.CounterOpts{
5959
Name: "cortex_compactor_garbage_collection_failures_total",
60-
Help: "TSDB Syncer: Total number of failed garbage collection operations.",
60+
Help: "Total number of failed garbage collection operations.",
6161
})
6262
m.garbageCollectionDuration = util.NewHistogramDataCollector(prometheus.NewDesc(
6363
"cortex_compactor_garbage_collection_duration_seconds",
64-
"TSDB Syncer: Time it took to perform garbage collection iteration.",
64+
"Time it took to perform garbage collection iteration.",
6565
nil, nil))
6666

6767
m.compactions = prometheus.NewCounter(prometheus.CounterOpts{
6868
Name: "cortex_compactor_group_compactions_total",
69-
Help: "TSDB Syncer: Total number of group compaction attempts that resulted in a new block.",
69+
Help: "Total number of group compaction attempts that resulted in a new block.",
7070
})
7171
m.compactionRunsStarted = prometheus.NewCounter(prometheus.CounterOpts{
7272
Name: "cortex_compactor_group_compaction_runs_started_total",
73-
Help: "TSDB Syncer: Total number of group compaction attempts.",
73+
Help: "Total number of group compaction attempts.",
7474
})
7575
m.compactionRunsCompleted = prometheus.NewCounter(prometheus.CounterOpts{
7676
Name: "cortex_compactor_group_compaction_runs_completed_total",
77-
Help: "TSDB Syncer: Total number of group completed compaction runs. This also includes compactor group runs that resulted with no compaction.",
77+
Help: "Total number of group completed compaction runs. This also includes compactor group runs that resulted with no compaction.",
7878
})
7979
m.compactionFailures = prometheus.NewCounter(prometheus.CounterOpts{
8080
Name: "cortex_compactor_group_compactions_failures_total",
81-
Help: "TSDB Syncer: Total number of failed group compactions.",
81+
Help: "Total number of failed group compactions.",
8282
})
8383
m.verticalCompactions = prometheus.NewCounter(prometheus.CounterOpts{
8484
Name: "cortex_compactor_group_vertical_compactions_total",
85-
Help: "TSDB Syncer: Total number of group compaction attempts that resulted in a new block based on overlapping blocks.",
85+
Help: "Total number of group compaction attempts that resulted in a new block based on overlapping blocks.",
8686
})
8787

8888
if reg != nil {

0 commit comments

Comments
 (0)