You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
467 B
24 lines
467 B
4 years ago
|
package rpc
|
||
|
|
||
|
import (
|
||
|
prom "github.com/harmony-one/harmony/api/service/prometheus"
|
||
|
"github.com/prometheus/client_golang/prometheus"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
prom.PromRegistry().MustRegister(
|
||
|
rpcRateLimitCounterVec,
|
||
|
)
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
rpcRateLimitCounterVec = prometheus.NewCounterVec(
|
||
|
prometheus.CounterOpts{
|
||
|
Namespace: "hmy",
|
||
|
Subsystem: "rpc",
|
||
|
Name: "over_ratelimit",
|
||
|
Help: "number of times triggered rpc rate limit",
|
||
|
},
|
||
|
[]string{"rate_limit"})
|
||
|
)
|