mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
27 lines
570 B
Go
27 lines
570 B
Go
package prometheus
|
|
|
|
import (
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
)
|
|
|
|
var (
|
|
// user rpc
|
|
UserLoginCounter prometheus.Counter
|
|
UserRegisterCounter prometheus.Counter
|
|
)
|
|
|
|
func NewUserLoginCounter() {
|
|
UserLoginCounter = promauto.NewCounter(prometheus.CounterOpts{
|
|
Name: "user_login",
|
|
Help: "The number of user login",
|
|
})
|
|
}
|
|
|
|
func NewUserRegisterCounter() {
|
|
UserRegisterCounter = promauto.NewCounter(prometheus.CounterOpts{
|
|
Name: "user_register",
|
|
Help: "The number of user register",
|
|
})
|
|
}
|