Skip to content

Commit

Permalink
Use exponential buckets for compactor histogram metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
  • Loading branch information
kakkoyun committed Sep 19, 2019
1 parent a07e91e commit 2a2826a
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions pkg/compact/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,9 @@ func newSyncerMetrics(reg prometheus.Registerer) *syncerMetrics {
Help: "Total number of failed sync meta operations.",
})
m.syncMetaDuration = prometheus.NewHistogram(prometheus.HistogramOpts{
Name: "thanos_compact_sync_meta_duration_seconds",
Help: "Time it took to sync meta files.",
Buckets: []float64{
0.25, 0.6, 1, 2, 3.5, 5, 7.5, 10, 15, 30, 60, 100, 200, 500,
},
Name: "thanos_compact_sync_meta_duration_seconds",
Help: "Time it took to sync meta files.",
Buckets: prometheus.ExponentialBuckets(0.1, 2.5, 12),
})

m.garbageCollectedBlocks = prometheus.NewCounter(prometheus.CounterOpts{
Expand All @@ -97,11 +95,9 @@ func newSyncerMetrics(reg prometheus.Registerer) *syncerMetrics {
Help: "Total number of failed garbage collection operations.",
})
m.garbageCollectionDuration = prometheus.NewHistogram(prometheus.HistogramOpts{
Name: "thanos_compact_garbage_collection_duration_seconds",
Help: "Time it took to perform garbage collection iteration.",
Buckets: []float64{
0.25, 0.6, 1, 2, 3.5, 5, 7.5, 10, 15, 30, 60, 100, 200, 500,
},
Name: "thanos_compact_garbage_collection_duration_seconds",
Help: "Time it took to perform garbage collection iteration.",
Buckets: prometheus.ExponentialBuckets(0.1, 2.5, 12),
})

m.compactions = prometheus.NewCounterVec(prometheus.CounterOpts{
Expand Down

0 comments on commit 2a2826a

Please sign in to comment.