|
|
|
@ -16,6 +16,9 @@ var (
|
|
|
|
|
|
|
|
|
|
MsgInsertRedisSuccessCounter prometheus.Counter
|
|
|
|
|
MsgInsertRedisFailedCounter prometheus.Counter
|
|
|
|
|
|
|
|
|
|
MsgInsertMongoSuccessCounter prometheus.Counter
|
|
|
|
|
MsgInsertMongoFailedCounter prometheus.Counter
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func NewUserLoginCounter() {
|
|
|
|
@ -70,3 +73,17 @@ func NewMsgInsertRedisFailedCounter() {
|
|
|
|
|
Help: "The number of failed insert msg to redis",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewMsgInsertMongoSuccessCounter() {
|
|
|
|
|
MsgInsertMongoSuccessCounter = promauto.NewCounter(prometheus.CounterOpts{
|
|
|
|
|
Name: "msg_insert_mongo_success",
|
|
|
|
|
Help: "The number of successful insert msg to mongo",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewMsgInsertMongoFailedCounter() {
|
|
|
|
|
MsgInsertMongoFailedCounter = promauto.NewCounter(prometheus.CounterOpts{
|
|
|
|
|
Name: "msg_insert_mongo_failed",
|
|
|
|
|
Help: "The number of failed insert msg to mongo",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|