This commit is contained in:
wangchuxiao 2022-09-09 15:29:22 +08:00
parent 061ad6df2c
commit 912da395c9

View File

@ -23,7 +23,11 @@ import (
) )
var ( var (
msgInsertMysqlProcessed prometheus.Counter // msgInsertMysqlProcessed perometheus.Countr
msgInsertMysqlProcessed = promauto.NewCounter(prometheus.CounterOpts{
Name: "insert_mysql_msg_total",
Help: "The total number of msg insert mysql events",
})
) )
type PersistentConsumerHandler struct { type PersistentConsumerHandler struct {
@ -42,7 +46,6 @@ func (pc *PersistentConsumerHandler) Init() {
Name: "insert_mysql_msg_total", Name: "insert_mysql_msg_total",
Help: "The total number of msg insert mysql events", Help: "The total number of msg insert mysql events",
}) })
prometheus.MustRegister(msgInsertMysqlProcessed)
} }
} }