prome

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// auth rpc.
	UserLoginCounter    prometheus.Counter
	UserRegisterCounter prometheus.Counter

	// seg.
	SeqGetSuccessCounter prometheus.Counter
	SeqGetFailedCounter  prometheus.Counter
	SeqSetSuccessCounter prometheus.Counter
	SeqSetFailedCounter  prometheus.Counter

	// msg-db.
	MsgInsertRedisSuccessCounter   prometheus.Counter
	MsgInsertRedisFailedCounter    prometheus.Counter
	MsgInsertMongoSuccessCounter   prometheus.Counter
	MsgInsertMongoFailedCounter    prometheus.Counter
	MsgPullFromRedisSuccessCounter prometheus.Counter
	MsgPullFromRedisFailedCounter  prometheus.Counter
	MsgPullFromMongoSuccessCounter prometheus.Counter
	MsgPullFromMongoFailedCounter  prometheus.Counter

	// msg-ws.
	MsgRecvTotalCounter          prometheus.Counter
	GetNewestSeqTotalCounter     prometheus.Counter
	PullMsgBySeqListTotalCounter prometheus.Counter

	SingleChatMsgRecvSuccessCounter         prometheus.Counter
	GroupChatMsgRecvSuccessCounter          prometheus.Counter
	WorkSuperGroupChatMsgRecvSuccessCounter prometheus.Counter
	OnlineUserGauge                         prometheus.Gauge

	// msg-msg.
	SingleChatMsgProcessSuccessCounter         prometheus.Counter
	SingleChatMsgProcessFailedCounter          prometheus.Counter
	GroupChatMsgProcessSuccessCounter          prometheus.Counter
	GroupChatMsgProcessFailedCounter           prometheus.Counter
	WorkSuperGroupChatMsgProcessSuccessCounter prometheus.Counter
	WorkSuperGroupChatMsgProcessFailedCounter  prometheus.Counter

	// msg-push.
	MsgOnlinePushSuccessCounter  prometheus.Counter
	MsgOfflinePushSuccessCounter prometheus.Counter
	MsgOfflinePushFailedCounter  prometheus.Counter
	// api.
	ApiRequestCounter        prometheus.Counter
	ApiRequestSuccessCounter prometheus.Counter
	ApiRequestFailedCounter  prometheus.Counter

	// grpc.
	GrpcRequestCounter        prometheus.Counter
	GrpcRequestSuccessCounter prometheus.Counter
	GrpcRequestFailedCounter  prometheus.Counter

	SendMsgCounter prometheus.Counter

	// conversation.
	ConversationCreateSuccessCounter prometheus.Counter
	ConversationCreateFailedCounter  prometheus.Counter
)
View Source
var Enable bool

Functions

func Add

func Add(counter prometheus.Counter, add int)

func GaugeDec

func GaugeDec(gauges prometheus.Gauge)

func GaugeInc

func GaugeInc(gauges prometheus.Gauge)

func Inc

func Inc(counter prometheus.Counter)

func NewApiRequestCounter

func NewApiRequestCounter()

func NewApiRequestFailedCounter

func NewApiRequestFailedCounter()

func NewApiRequestSuccessCounter

func NewApiRequestSuccessCounter()

func NewConversationCreateFailedCounter

func NewConversationCreateFailedCounter()

func NewConversationCreateSuccessCounter

func NewConversationCreateSuccessCounter()

func NewGetNewestSeqTotalCounter

func NewGetNewestSeqTotalCounter()

func NewGroupChatMsgProcessFailedCounter

func NewGroupChatMsgProcessFailedCounter()

func NewGroupChatMsgProcessSuccessCounter

func NewGroupChatMsgProcessSuccessCounter()

func NewGroupChatMsgRecvSuccessCounter

func NewGroupChatMsgRecvSuccessCounter()

func NewGrpcRequestCounter

func NewGrpcRequestCounter()

func NewGrpcRequestFailedCounter

func NewGrpcRequestFailedCounter()

func NewGrpcRequestSuccessCounter

func NewGrpcRequestSuccessCounter()

func NewMsgInsertMongoFailedCounter

func NewMsgInsertMongoFailedCounter()

func NewMsgInsertMongoSuccessCounter

func NewMsgInsertMongoSuccessCounter()

func NewMsgInsertRedisFailedCounter

func NewMsgInsertRedisFailedCounter()

func NewMsgInsertRedisSuccessCounter

func NewMsgInsertRedisSuccessCounter()

func NewMsgOfflinePushFailedCounter

func NewMsgOfflinePushFailedCounter()

func NewMsgOfflinePushSuccessCounter

func NewMsgOfflinePushSuccessCounter()

func NewMsgOnlinePushSuccessCounter

func NewMsgOnlinePushSuccessCounter()

func NewMsgPullFromMongoFailedCounter

func NewMsgPullFromMongoFailedCounter()

func NewMsgPullFromMongoSuccessCounter

func NewMsgPullFromMongoSuccessCounter()

func NewMsgPullFromRedisFailedCounter

func NewMsgPullFromRedisFailedCounter()

func NewMsgPullFromRedisSuccessCounter

func NewMsgPullFromRedisSuccessCounter()

func NewMsgRecvTotalCounter

func NewMsgRecvTotalCounter()

func NewOnlineUserGauges

func NewOnlineUserGauges()

func NewPullMsgBySeqListTotalCounter

func NewPullMsgBySeqListTotalCounter()

func NewSendMsgCount

func NewSendMsgCount()

func NewSeqGetFailedCounter

func NewSeqGetFailedCounter()

func NewSeqGetSuccessCounter

func NewSeqGetSuccessCounter()

func NewSeqSetFailedCounter

func NewSeqSetFailedCounter()

func NewSeqSetSuccessCounter

func NewSeqSetSuccessCounter()

func NewSingleChatMsgProcessFailedCounter

func NewSingleChatMsgProcessFailedCounter()

func NewSingleChatMsgProcessSuccessCounter

func NewSingleChatMsgProcessSuccessCounter()

func NewSingleChatMsgRecvSuccessCounter

func NewSingleChatMsgRecvSuccessCounter()

func NewUserLoginCounter

func NewUserLoginCounter()

func NewUserRegisterCounter

func NewUserRegisterCounter()

func NewWorkSuperGroupChatMsgProcessFailedCounter

func NewWorkSuperGroupChatMsgProcessFailedCounter()

func NewWorkSuperGroupChatMsgProcessSuccessCounter

func NewWorkSuperGroupChatMsgProcessSuccessCounter()

func NewWorkSuperGroupChatMsgRecvSuccessCounter

func NewWorkSuperGroupChatMsgRecvSuccessCounter()

func PrometheusHandler

func PrometheusHandler() gin.HandlerFunc

func PrometheusMiddleware

func PrometheusMiddleware(c *gin.Context)

func StartPrometheusSrv

func StartPrometheusSrv(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