diff --git a/pkg/common/prometheus/gather.go b/pkg/common/prometheus/gather.go index 8b28424fd..534a27d68 100644 --- a/pkg/common/prometheus/gather.go +++ b/pkg/common/prometheus/gather.go @@ -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", + }) +}