mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-07 19:22:30 +08:00
prometheus for statistics
This commit is contained in:
parent
e78f7a2a37
commit
8dce5396b0
@ -9,6 +9,11 @@ var (
|
|||||||
// user rpc
|
// user rpc
|
||||||
UserLoginCounter prometheus.Counter
|
UserLoginCounter prometheus.Counter
|
||||||
UserRegisterCounter prometheus.Counter
|
UserRegisterCounter prometheus.Counter
|
||||||
|
|
||||||
|
SeqGetSuccessCounter prometheus.Counter
|
||||||
|
SeqGetFailedCounter prometheus.Counter
|
||||||
|
SeqSetSuccessCounter prometheus.Counter
|
||||||
|
SeqSetFailedCounter prometheus.Counter
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewUserLoginCounter() {
|
func NewUserLoginCounter() {
|
||||||
@ -18,9 +23,28 @@ func NewUserLoginCounter() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewUserRegisterCounter() {
|
func NewSeqGetSuccessCounter() {
|
||||||
UserRegisterCounter = promauto.NewCounter(prometheus.CounterOpts{
|
SeqGetSuccessCounter = promauto.NewCounter(prometheus.CounterOpts{
|
||||||
Name: "user_register",
|
Name: "seq_get_success",
|
||||||
Help: "The number of user register",
|
Help: "The number of successful get seq",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
func NewSeqGetFailedCounter() {
|
||||||
|
SeqGetFailedCounter = promauto.NewCounter(prometheus.CounterOpts{
|
||||||
|
Name: "seq_get_failed",
|
||||||
|
Help: "The number of failed get seq",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewSeqSetSuccessCounter() {
|
||||||
|
SeqSetSuccessCounter = promauto.NewCounter(prometheus.CounterOpts{
|
||||||
|
Name: "seq_set_success",
|
||||||
|
Help: "The number of successful set seq",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
func NewSeqSetFailedCounter() {
|
||||||
|
SeqSetFailedCounter = promauto.NewCounter(prometheus.CounterOpts{
|
||||||
|
Name: "seq_set_failed",
|
||||||
|
Help: "The number of failed set seq",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user