Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SingleChatMsgProcessSuccessCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "single_chat_msg_process_success_total", Help: "The number of single chat msg successful processed", }) SingleChatMsgProcessFailedCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "single_chat_msg_process_failed_total", Help: "The number of single chat msg failed processed", }) GroupChatMsgProcessSuccessCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "group_chat_msg_process_success_total", Help: "The number of group chat msg successful processed", }) GroupChatMsgProcessFailedCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "group_chat_msg_process_failed_total", Help: "The number of group chat msg failed processed", }) )
View Source
var ( MsgInsertRedisSuccessCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "msg_insert_redis_success_total", Help: "The number of successful insert msg to redis", }) MsgInsertRedisFailedCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "msg_insert_redis_failed_total", Help: "The number of failed insert msg to redis", }) MsgInsertMongoSuccessCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "msg_insert_mongo_success_total", Help: "The number of successful insert msg to mongo", }) MsgInsertMongoFailedCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "msg_insert_mongo_failed_total", Help: "The number of failed insert msg to mongo", }) SeqSetFailedCounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "seq_set_failed_total", Help: "The number of failed set seq", }) )
View Source
var ( ApiCustomCnt = &ginProm.Metric{ Name: "custom_total", Description: "Custom counter events.", Type: "counter_vec", Args: []string{"label_one", "label_two"}, } )
labels := prometheus.Labels{"label_one": "any", "label_two": "value"} ApiCustomCnt.MetricCollector.(*prometheus.CounterVec).With(labels).Inc().
View Source
var (
MsgOfflinePushFailedCounter = prometheus.NewCounter(prometheus.CounterOpts{
Name: "msg_offline_push_failed_total",
Help: "The number of msg failed offline pushed",
})
)
View Source
var (
OnlineUserGauge = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "online_user_num",
Help: "The number of online user num",
})
)
View Source
var (
UserLoginCounter = prometheus.NewCounter(prometheus.CounterOpts{
Name: "user_login_total",
Help: "The number of user login",
})
)
Functions ¶
func GetGinCusMetrics ¶
func GetGinCusMetrics(name string) []*ginprometheus.Metric
func GetGrpcCusMetrics ¶
func GetGrpcCusMetrics(registerName string) []prometheus.Collector
func NewGrpcPromObj ¶
func NewGrpcPromObj(cusMetrics []prometheus.Collector) (*prometheus.Registry, *grpc_prometheus.ServerMetrics, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.