From eab10d1846a2f2879d27c9673919ab52aa1c5adf Mon Sep 17 00:00:00 2001 From: Owen Diehl Date: Mon, 20 Apr 2020 11:40:30 -0400 Subject: [PATCH] chunk bounds metric now records 8h range in 1h increments --- pkg/ingester/flush.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/ingester/flush.go b/pkg/ingester/flush.go index cc0ecb513871..74c86e5650a8 100644 --- a/pkg/ingester/flush.go +++ b/pkg/ingester/flush.go @@ -83,10 +83,10 @@ var ( }, []string{"reason"}) chunkLifespan = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "loki", - Name: "ingester_chunk_bounds_minutes", + Name: "ingester_chunk_bounds_hours", Help: "Distribution of chunk end-start durations.", - // 15m to 2h - Buckets: prometheus.LinearBuckets(15, 15, 8), + // 1h -> 8hr + Buckets: prometheus.LinearBuckets(1, 1, 8), }) ) @@ -362,7 +362,7 @@ func (i *Ingester) flushChunks(ctx context.Context, fp model.Fingerprint, labelP countPerTenant.Inc() firstTime, lastTime := cs[i].chunk.Bounds() chunkAge.Observe(time.Since(firstTime).Seconds()) - chunkLifespan.Observe(lastTime.Sub(firstTime).Minutes()) + chunkLifespan.Observe(lastTime.Sub(firstTime).Hours()) } return nil