@@ -48,6 +48,7 @@ type ingesterMetrics struct {
48
48
queriedSamples prometheus.Histogram
49
49
queriedSeries prometheus.Histogram
50
50
queriedChunks prometheus.Histogram
51
+ walReplayDuration prometheus.Summary
51
52
}
52
53
53
54
func newIngesterMetrics (r prometheus.Registerer ) * ingesterMetrics {
@@ -86,6 +87,11 @@ func newIngesterMetrics(r prometheus.Registerer) *ingesterMetrics {
86
87
// A small number of chunks per series - 10*(8^(7-1)) = 2.6m.
87
88
Buckets : prometheus .ExponentialBuckets (10 , 8 , 7 ),
88
89
}),
90
+ walReplayDuration : prometheus .NewSummary (prometheus.SummaryOpts {
91
+ Name : "cortex_ingester_wal_replay_duration_seconds" ,
92
+ Help : "Time taken to replay the checkpoint and the WAL." ,
93
+ Objectives : map [float64 ]float64 {0.5 : 0.05 , 0.9 : 0.01 , 0.99 : 0.001 },
94
+ }),
89
95
}
90
96
91
97
if r != nil {
@@ -245,6 +251,7 @@ func New(cfg Config, clientConfig client.Config, limits *validation.Overrides, c
245
251
}
246
252
elapsed := time .Since (start )
247
253
level .Info (util .Logger ).Log ("msg" , "recovery from WAL completed" , "time" , elapsed .String ())
254
+ i .metrics .walReplayDuration .Observe (elapsed .Seconds ())
248
255
}
249
256
250
257
// If the WAL recover happened, then the userStates would already be set.
@@ -334,7 +341,6 @@ func (i *Ingester) StopIncomingRequests() {
334
341
335
342
// Push implements client.IngesterServer
336
343
func (i * Ingester ) Push (ctx old_ctx.Context , req * client.WriteRequest ) (* client.WriteResponse , error ) {
337
-
338
344
if i .cfg .TSDBEnabled {
339
345
return i .v2Push (ctx , req )
340
346
}
0 commit comments