prommetrics

package
v3.8.1-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

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 (
	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 APICall added in v3.8.0

func APICall(path string, method string, apiCode int)

func ApiInit added in v3.8.0

func ApiInit(prometheusPort int) error

func GetGrpcCusMetrics

func GetGrpcCusMetrics(registerName string, share *config.Share) []prometheus.Collector

func GetGrpcServerMetrics added in v3.8.0

func GetGrpcServerMetrics() *gp.ServerMetrics

func HttpCall added in v3.8.0

func HttpCall(path string, method string, status int)

func Init added in v3.8.0

func Init(registry *prometheus.Registry, prometheusPort int, path string, handler http.Handler, cs ...prometheus.Collector) error

func RPCCall added in v3.8.0

func RPCCall(name string, path string, code int)

func RpcInit added in v3.8.0

func RpcInit(cs []prometheus.Collector, prometheusPort int) error

func TransferInit added in v3.8.0

func TransferInit(prometheusPort int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL