prometheus for statistics
This commit is contained in:
@@ -16,6 +16,9 @@ var (
|
|||||||
|
|
||||||
MsgInsertRedisSuccessCounter prometheus.Counter
|
MsgInsertRedisSuccessCounter prometheus.Counter
|
||||||
MsgInsertRedisFailedCounter prometheus.Counter
|
MsgInsertRedisFailedCounter prometheus.Counter
|
||||||
|
|
||||||
|
MsgInsertMongoSuccessCounter prometheus.Counter
|
||||||
|
MsgInsertMongoFailedCounter prometheus.Counter
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewUserLoginCounter() {
|
func NewUserLoginCounter() {
|
||||||
@@ -70,3 +73,17 @@ func NewMsgInsertRedisFailedCounter() {
|
|||||||
Help: "The number of failed insert msg to redis",
|
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",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user