Documentation ¶
Index ¶
- Variables
- func APICall(path string, method string, apiCode int)
- func ApiInit(prometheusPort int) error
- func GetGrpcCusMetrics(registerName string, share *config.Share) []prometheus.Collector
- func GetGrpcServerMetrics() *gp.ServerMetrics
- func HttpCall(path string, method string, status int)
- func Init(registry *prometheus.Registry, prometheusPort int, path string, ...) error
- func RPCCall(name string, path string, code int)
- func RpcInit(cs []prometheus.Collector, prometheusPort int) error
- func TransferInit(prometheusPort int) error
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 ( 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", }) )
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 (
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",
})
)
View Source
var (
UserRegisterCounter = prometheus.NewCounter(prometheus.CounterOpts{
Name: "user_register_total",
Help: "The number of user login",
})
)
Functions ¶
func GetGrpcCusMetrics ¶
func GetGrpcCusMetrics(registerName string, share *config.Share) []prometheus.Collector
func GetGrpcServerMetrics ¶ added in v3.8.0
func GetGrpcServerMetrics() *gp.ServerMetrics
func Init ¶ added in v3.8.0
func Init(registry *prometheus.Registry, prometheusPort int, path string, handler http.Handler, cs ...prometheus.Collector) error
func TransferInit ¶ added in v3.8.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.