@@ -82,10 +82,10 @@ var transactionsDroppedCounter = prometheus.NewCounter(prometheus.CounterOpts{
82
82
Help : "Total number of EVM transactions dropped due to service errors" ,
83
83
})
84
84
85
- var eoaRateLimitedTransactions = prometheus .NewCounterVec (prometheus.CounterOpts {
86
- Name : prefixedName ("eoa_rate_limited_transactions " ),
87
- Help : "Total number of rate limited transactions by EOA " ,
88
- }, [] string { "address" } )
85
+ var rateLimitedTransactionsCounter = prometheus .NewCounter (prometheus.CounterOpts {
86
+ Name : prefixedName ("rate_limited_transactions_total " ),
87
+ Help : "Total number of rate- limited transactions" ,
88
+ })
89
89
90
90
var metrics = []prometheus.Collector {
91
91
apiErrors ,
@@ -102,7 +102,7 @@ var metrics = []prometheus.Collector{
102
102
blockIngestionTime ,
103
103
requestRateLimitedCounters ,
104
104
transactionsDroppedCounter ,
105
- eoaRateLimitedTransactions ,
105
+ rateLimitedTransactionsCounter ,
106
106
}
107
107
108
108
type Collector interface {
@@ -119,28 +119,28 @@ type Collector interface {
119
119
BlockIngestionTime (blockCreation time.Time )
120
120
RequestRateLimited (method string )
121
121
TransactionsDropped (count int )
122
- EOARateLimited ( address string )
122
+ TransactionRateLimited ( )
123
123
}
124
124
125
125
var _ Collector = & DefaultCollector {}
126
126
127
127
type DefaultCollector struct {
128
128
// TODO: for now we cannot differentiate which api request failed number of times
129
- apiErrorsCounter prometheus.Counter
130
- serverPanicsCounters * prometheus.CounterVec
131
- cadenceBlockHeight prometheus.Gauge
132
- evmBlockHeight prometheus.Gauge
133
- evmBlockIndexedCounter prometheus.Counter
134
- evmTxIndexedCounter prometheus.Counter
135
- operatorBalance prometheus.Gauge
136
- evmAccountCallCounters * prometheus.CounterVec
137
- requestDurations * prometheus.HistogramVec
138
- availableSigningkeys prometheus.Gauge
139
- gasEstimationIterations prometheus.Gauge
140
- blockIngestionTime prometheus.Histogram
141
- requestRateLimitedCounters * prometheus.CounterVec
142
- transactionsDroppedCounter prometheus.Counter
143
- eoaRateLimitedTransactions * prometheus.CounterVec
129
+ apiErrorsCounter prometheus.Counter
130
+ serverPanicsCounters * prometheus.CounterVec
131
+ cadenceBlockHeight prometheus.Gauge
132
+ evmBlockHeight prometheus.Gauge
133
+ evmBlockIndexedCounter prometheus.Counter
134
+ evmTxIndexedCounter prometheus.Counter
135
+ operatorBalance prometheus.Gauge
136
+ evmAccountCallCounters * prometheus.CounterVec
137
+ requestDurations * prometheus.HistogramVec
138
+ availableSigningkeys prometheus.Gauge
139
+ gasEstimationIterations prometheus.Gauge
140
+ blockIngestionTime prometheus.Histogram
141
+ requestRateLimitedCounters * prometheus.CounterVec
142
+ transactionsDroppedCounter prometheus.Counter
143
+ rateLimitedTransactionsCounter prometheus.Counter
144
144
}
145
145
146
146
func NewCollector (logger zerolog.Logger ) Collector {
@@ -150,21 +150,21 @@ func NewCollector(logger zerolog.Logger) Collector {
150
150
}
151
151
152
152
return & DefaultCollector {
153
- apiErrorsCounter : apiErrors ,
154
- serverPanicsCounters : serverPanicsCounters ,
155
- cadenceBlockHeight : cadenceBlockHeight ,
156
- evmBlockHeight : evmBlockHeight ,
157
- evmBlockIndexedCounter : evmBlockIndexedCounter ,
158
- evmTxIndexedCounter : evmTxIndexedCounter ,
159
- evmAccountCallCounters : evmAccountCallCounters ,
160
- requestDurations : requestDurations ,
161
- operatorBalance : operatorBalance ,
162
- availableSigningkeys : availableSigningKeys ,
163
- gasEstimationIterations : gasEstimationIterations ,
164
- blockIngestionTime : blockIngestionTime ,
165
- requestRateLimitedCounters : requestRateLimitedCounters ,
166
- transactionsDroppedCounter : transactionsDroppedCounter ,
167
- eoaRateLimitedTransactions : eoaRateLimitedTransactions ,
153
+ apiErrorsCounter : apiErrors ,
154
+ serverPanicsCounters : serverPanicsCounters ,
155
+ cadenceBlockHeight : cadenceBlockHeight ,
156
+ evmBlockHeight : evmBlockHeight ,
157
+ evmBlockIndexedCounter : evmBlockIndexedCounter ,
158
+ evmTxIndexedCounter : evmTxIndexedCounter ,
159
+ evmAccountCallCounters : evmAccountCallCounters ,
160
+ requestDurations : requestDurations ,
161
+ operatorBalance : operatorBalance ,
162
+ availableSigningkeys : availableSigningKeys ,
163
+ gasEstimationIterations : gasEstimationIterations ,
164
+ blockIngestionTime : blockIngestionTime ,
165
+ requestRateLimitedCounters : requestRateLimitedCounters ,
166
+ transactionsDroppedCounter : transactionsDroppedCounter ,
167
+ rateLimitedTransactionsCounter : rateLimitedTransactionsCounter ,
168
168
}
169
169
}
170
170
@@ -243,10 +243,8 @@ func (c *DefaultCollector) TransactionsDropped(count int) {
243
243
c .transactionsDroppedCounter .Add (float64 (count ))
244
244
}
245
245
246
- func (c * DefaultCollector ) EOARateLimited (address string ) {
247
- c .eoaRateLimitedTransactions .
248
- With (prometheus.Labels {"address" : address }).
249
- Inc ()
246
+ func (c * DefaultCollector ) TransactionRateLimited () {
247
+ c .rateLimitedTransactionsCounter .Inc ()
250
248
}
251
249
252
250
func prefixedName (name string ) string {
0 commit comments