promethues

This commit is contained in:
wangchuxiao 2022-09-09 16:53:07 +08:00
parent 46b1803086
commit 9130881875

View File

@ -78,8 +78,9 @@ func (pc *PersistentConsumerHandler) handleChatWs2Mysql(cMsg *sarama.ConsumerMes
log.NewError(msgFromMQ.OperationID, "Message insert failed", "err", err.Error(), "msg", msgFromMQ.String())
return
}
msgInsertMysqlProcessed.Add(1)
if config.Config.Prometheus.Enable {
log.NewDebug(msgFromMQ.OperationID, utils.GetSelfFuncName(), "inc msgInsertMysqlProcessed")
log.NewDebug(msgFromMQ.OperationID, utils.GetSelfFuncName(), "inc msgInsertMysqlProcessed", msgInsertMysqlProcessed.Desc())
msgInsertMysqlProcessed.Inc()
}
}