@@ -102,6 +102,10 @@ type Metrics struct {
102
102
103
103
// The amount of proposals that failed to be received in time
104
104
TimedOutProposals metrics.Counter
105
+
106
+ CompactBlocksReceived metrics.Counter
107
+ CompactBlocksSent metrics.Counter
108
+ CompactBlocksFailed metrics.Counter
105
109
}
106
110
107
111
// PrometheusMetrics returns Metrics build using Prometheus client library.
@@ -279,6 +283,24 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
279
283
Name : "timed_out_proposals" ,
280
284
Help : "Number of proposals that failed to be received in time" ,
281
285
}, labels ).With (labelsAndValues ... ),
286
+ CompactBlocksReceived : prometheus .NewCounterFrom (stdprometheus.CounterOpts {
287
+ Namespace : namespace ,
288
+ Subsystem : MetricsSubsystem ,
289
+ Name : "compact_blocks_received" ,
290
+ Help : "Number of compact blocks received by the node" ,
291
+ }, labels ).With (labelsAndValues ... ),
292
+ CompactBlocksSent : prometheus .NewCounterFrom (stdprometheus.CounterOpts {
293
+ Namespace : namespace ,
294
+ Subsystem : MetricsSubsystem ,
295
+ Name : "compact_blocks_sent" ,
296
+ Help : "Number of compact blocks sent by the node" ,
297
+ }, labels ).With (labelsAndValues ... ),
298
+ CompactBlocksFailed : prometheus .NewCounterFrom (stdprometheus.CounterOpts {
299
+ Namespace : namespace ,
300
+ Subsystem : MetricsSubsystem ,
301
+ Name : "compact_blocks_failed" ,
302
+ Help : "Number of compact blocks failed to be received by the node" ,
303
+ }, labels ).With (labelsAndValues ... ),
282
304
}
283
305
}
284
306
@@ -317,6 +339,10 @@ func NopMetrics() *Metrics {
317
339
FullPrevoteMessageDelay : discard .NewGauge (),
318
340
ApplicationRejectedProposals : discard .NewCounter (),
319
341
TimedOutProposals : discard .NewCounter (),
342
+
343
+ CompactBlocksReceived : discard .NewCounter (),
344
+ CompactBlocksSent : discard .NewCounter (),
345
+ CompactBlocksFailed : discard .NewCounter (),
320
346
}
321
347
}
322
348
0 commit comments