mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-15 09:47:09 +08:00
24 lines
557 B
Go
24 lines
557 B
Go
package prommetrics
|
|
|
|
import (
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
)
|
|
|
|
var (
|
|
MsgOfflinePushFailedCounter = prometheus.NewCounter(prometheus.CounterOpts{
|
|
Name: "msg_offline_push_failed_total",
|
|
Help: "The number of msg failed offline pushed",
|
|
})
|
|
MsgLoneTimePushCounter = prometheus.NewCounter(prometheus.CounterOpts{
|
|
Name: "msg_long_time_push_total",
|
|
Help: "The number of messages with a push time exceeding 10 seconds",
|
|
})
|
|
)
|
|
|
|
func RegistryPush() {
|
|
registry.MustRegister(
|
|
MsgOfflinePushFailedCounter,
|
|
MsgLoneTimePushCounter,
|
|
)
|
|
}
|