@@ -19,6 +19,8 @@ type Metrics struct {
19
19
BlockProcessingTime metrics.Histogram
20
20
// Count of times a block was rejected via ProcessProposal
21
21
ProcessProposalRejected metrics.Counter
22
+ // Count of transactions rejected by application.
23
+ RejectedTransactions metrics.Counter
22
24
}
23
25
24
26
// PrometheusMetrics returns Metrics build using Prometheus client library.
@@ -43,6 +45,12 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
43
45
Name : "process_proposal_rejected" ,
44
46
Help : "Count of times a block was rejected via ProcessProposal" ,
45
47
}, labels ).With (labelsAndValues ... ),
48
+ RejectedTransactions : prometheus .NewCounterFrom (stdprometheus.CounterOpts {
49
+ Namespace : namespace ,
50
+ Subsystem : MetricsSubsystem ,
51
+ Name : "rejected_transactions" ,
52
+ Help : "Count of transactions rejected by application" ,
53
+ }, labels ).With (labelsAndValues ... ),
46
54
}
47
55
}
48
56
@@ -51,5 +59,6 @@ func NopMetrics() *Metrics {
51
59
return & Metrics {
52
60
BlockProcessingTime : discard .NewHistogram (),
53
61
ProcessProposalRejected : discard .NewCounter (),
62
+ RejectedTransactions : discard .NewCounter (),
54
63
}
55
64
}
0 commit comments