Skip to content

Commit

Permalink
refactor(blooms): Delete outdated metas (#13153)
Browse files Browse the repository at this point in the history
  • Loading branch information
salvacorts authored Jun 7, 2024
1 parent fbe7c55 commit 9c96d26
Show file tree
Hide file tree
Showing 7 changed files with 1,185 additions and 113 deletions.
16 changes: 16 additions & 0 deletions pkg/bloombuild/planner/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ type Metrics struct {
buildCompleted *prometheus.CounterVec
buildTime *prometheus.HistogramVec

blocksDeleted prometheus.Counter
metasDeleted prometheus.Counter

tenantsDiscovered prometheus.Counter
}

Expand Down Expand Up @@ -107,6 +110,19 @@ func NewMetrics(
Buckets: prometheus.DefBuckets,
}, []string{"status"}),

blocksDeleted: promauto.With(r).NewCounter(prometheus.CounterOpts{
Namespace: metricsNamespace,
Subsystem: metricsSubsystem,
Name: "blocks_deleted_total",
Help: "Number of blocks deleted",
}),
metasDeleted: promauto.With(r).NewCounter(prometheus.CounterOpts{
Namespace: metricsNamespace,
Subsystem: metricsSubsystem,
Name: "metas_deleted_total",
Help: "Number of metas deleted",
}),

tenantsDiscovered: promauto.With(r).NewCounter(prometheus.CounterOpts{
Namespace: metricsNamespace,
Subsystem: metricsSubsystem,
Expand Down
Loading

0 comments on commit 9c96d26

Please sign in to comment.