@@ -77,10 +77,10 @@ var requestRateLimitedCounters = prometheus.NewCounterVec(prometheus.CounterOpts
77
77
Help : "Total number of rate limits by JSON-RPC method" ,
78
78
}, []string {"method" })
79
79
80
- var eoaRateLimitedTransactions = prometheus .NewCounterVec (prometheus.CounterOpts {
81
- Name : prefixedName ("eoa_rate_limited_transactions " ),
82
- Help : "Total number of rate limited transactions by EOA " ,
83
- }, [] string { "address" } )
80
+ var rateLimitedTransactionsCounter = prometheus .NewCounter (prometheus.CounterOpts {
81
+ Name : prefixedName ("rate_limited_transactions_total " ),
82
+ Help : "Total number of rate- limited transactions" ,
83
+ })
84
84
85
85
var metrics = []prometheus.Collector {
86
86
apiErrors ,
@@ -96,7 +96,7 @@ var metrics = []prometheus.Collector{
96
96
gasEstimationIterations ,
97
97
blockIngestionTime ,
98
98
requestRateLimitedCounters ,
99
- eoaRateLimitedTransactions ,
99
+ rateLimitedTransactionsCounter ,
100
100
}
101
101
102
102
type Collector interface {
@@ -112,27 +112,27 @@ type Collector interface {
112
112
GasEstimationIterations (count int )
113
113
BlockIngestionTime (blockCreation time.Time )
114
114
RequestRateLimited (method string )
115
- EOARateLimited ( address string )
115
+ TransactionRateLimited ( )
116
116
}
117
117
118
118
var _ Collector = & DefaultCollector {}
119
119
120
120
type DefaultCollector struct {
121
121
// TODO: for now we cannot differentiate which api request failed number of times
122
- apiErrorsCounter prometheus.Counter
123
- serverPanicsCounters * prometheus.CounterVec
124
- cadenceBlockHeight prometheus.Gauge
125
- evmBlockHeight prometheus.Gauge
126
- evmBlockIndexedCounter prometheus.Counter
127
- evmTxIndexedCounter prometheus.Counter
128
- operatorBalance prometheus.Gauge
129
- evmAccountCallCounters * prometheus.CounterVec
130
- requestDurations * prometheus.HistogramVec
131
- availableSigningkeys prometheus.Gauge
132
- gasEstimationIterations prometheus.Gauge
133
- blockIngestionTime prometheus.Histogram
134
- requestRateLimitedCounters * prometheus.CounterVec
135
- eoaRateLimitedTransactions * prometheus.CounterVec
122
+ apiErrorsCounter prometheus.Counter
123
+ serverPanicsCounters * prometheus.CounterVec
124
+ cadenceBlockHeight prometheus.Gauge
125
+ evmBlockHeight prometheus.Gauge
126
+ evmBlockIndexedCounter prometheus.Counter
127
+ evmTxIndexedCounter prometheus.Counter
128
+ operatorBalance prometheus.Gauge
129
+ evmAccountCallCounters * prometheus.CounterVec
130
+ requestDurations * prometheus.HistogramVec
131
+ availableSigningkeys prometheus.Gauge
132
+ gasEstimationIterations prometheus.Gauge
133
+ blockIngestionTime prometheus.Histogram
134
+ requestRateLimitedCounters * prometheus.CounterVec
135
+ rateLimitedTransactionsCounter prometheus.Counter
136
136
}
137
137
138
138
func NewCollector (logger zerolog.Logger ) Collector {
@@ -142,20 +142,20 @@ func NewCollector(logger zerolog.Logger) Collector {
142
142
}
143
143
144
144
return & DefaultCollector {
145
- apiErrorsCounter : apiErrors ,
146
- serverPanicsCounters : serverPanicsCounters ,
147
- cadenceBlockHeight : cadenceBlockHeight ,
148
- evmBlockHeight : evmBlockHeight ,
149
- evmBlockIndexedCounter : evmBlockIndexedCounter ,
150
- evmTxIndexedCounter : evmTxIndexedCounter ,
151
- evmAccountCallCounters : evmAccountCallCounters ,
152
- requestDurations : requestDurations ,
153
- operatorBalance : operatorBalance ,
154
- availableSigningkeys : availableSigningKeys ,
155
- gasEstimationIterations : gasEstimationIterations ,
156
- blockIngestionTime : blockIngestionTime ,
157
- requestRateLimitedCounters : requestRateLimitedCounters ,
158
- eoaRateLimitedTransactions : eoaRateLimitedTransactions ,
145
+ apiErrorsCounter : apiErrors ,
146
+ serverPanicsCounters : serverPanicsCounters ,
147
+ cadenceBlockHeight : cadenceBlockHeight ,
148
+ evmBlockHeight : evmBlockHeight ,
149
+ evmBlockIndexedCounter : evmBlockIndexedCounter ,
150
+ evmTxIndexedCounter : evmTxIndexedCounter ,
151
+ evmAccountCallCounters : evmAccountCallCounters ,
152
+ requestDurations : requestDurations ,
153
+ operatorBalance : operatorBalance ,
154
+ availableSigningkeys : availableSigningKeys ,
155
+ gasEstimationIterations : gasEstimationIterations ,
156
+ blockIngestionTime : blockIngestionTime ,
157
+ requestRateLimitedCounters : requestRateLimitedCounters ,
158
+ rateLimitedTransactionsCounter : rateLimitedTransactionsCounter ,
159
159
}
160
160
}
161
161
@@ -230,10 +230,8 @@ func (c *DefaultCollector) RequestRateLimited(method string) {
230
230
).Inc ()
231
231
}
232
232
233
- func (c * DefaultCollector ) EOARateLimited (address string ) {
234
- c .eoaRateLimitedTransactions .
235
- With (prometheus.Labels {"address" : address }).
236
- Inc ()
233
+ func (c * DefaultCollector ) TransactionRateLimited () {
234
+ c .rateLimitedTransactionsCounter .Inc ()
237
235
}
238
236
239
237
func prefixedName (name string ) string {
0 commit comments