Delete prefix blocks_meta for meta fetcher metrics by SungJin1212 · Pull Request #6832 · cortexproject/cortex · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
32 changes: 13 additions & 19 deletions pkg/compactor/compactor_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,44 +75,38 @@ func newCompactorMetricsWithLabels(reg prometheus.Registerer, commonLabels []str

// Copied from Thanos, pkg/block/fetcher.go
m.baseFetcherSyncs = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{
Subsystem: block.FetcherSubSys,
Name: "cortex_compactor_meta_base_syncs_total",
Help: "Total blocks metadata synchronization attempts by base Fetcher.",
Name: "cortex_compactor_meta_base_syncs_total",
Help: "Total blocks metadata synchronization attempts by base Fetcher.",
}, nil)

// Copied from Thanos, pkg/block/fetcher.go
m.metaFetcherSyncs = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{
Subsystem: block.FetcherSubSys,
Name: "cortex_compactor_meta_syncs_total",
Help: "Total blocks metadata synchronization attempts.",
Name: "cortex_compactor_meta_syncs_total",
Help: "Total blocks metadata synchronization attempts.",
}, nil)
m.metaFetcherSyncFailures = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{
Subsystem: block.FetcherSubSys,
Name: "cortex_compactor_meta_sync_failures_total",
Help: "Total blocks metadata synchronization failures.",
Name: "cortex_compactor_meta_sync_failures_total",
Help: "Total blocks metadata synchronization failures.",
}, nil)
m.metaFetcherSyncDuration = promauto.With(reg).NewHistogramVec(prometheus.HistogramOpts{
Subsystem: block.FetcherSubSys,
Name: "cortex_compactor_meta_sync_duration_seconds",
Help: "Duration of the blocks metadata synchronization in seconds.",
Buckets: []float64{0.01, 1, 10, 100, 300, 600, 1000},
Name: "cortex_compactor_meta_sync_duration_seconds",
Help: "Duration of the blocks metadata synchronization in seconds.",
Buckets: []float64{0.01, 1, 10, 100, 300, 600, 1000},
}, nil)
m.metaFetcherSynced = extprom.NewTxGaugeVec(
reg,
prometheus.GaugeOpts{
Subsystem: block.FetcherSubSys,
Name: "cortex_compactor_meta_synced",
Help: "Number of block metadata synced",
Name: "cortex_compactor_meta_synced",
Help: "Number of block metadata synced",
},
[]string{"state"},
block.DefaultSyncedStateLabelValues()...,
)
m.metaFetcherModified = extprom.NewTxGaugeVec(
reg,
prometheus.GaugeOpts{
Subsystem: block.FetcherSubSys,
Name: "cortex_compactor_meta_modified",
Help: "Number of blocks whose metadata changed",
Name: "cortex_compactor_meta_modified",
Help: "Number of blocks whose metadata changed",
},
[]string{"modified"},
block.DefaultModifiedLabelValues()...,
Expand Down
72 changes: 36 additions & 36 deletions pkg/compactor/compactor_metrics_test.go
Loading