metrics

package
v0.0.0-...-a69402d Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 2 Imported by: 0

README

metrics

框架集成 prometheus 监控。可以能过 /metrics 查询。

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RPCDurationsSeconds rpc 服务耗时
	RPCDurationsSeconds *prometheus.HistogramVec
	// DBDurationsSeconds mysql 调用耗时
	DBDurationsSeconds *prometheus.HistogramVec
	// MCDurationsSeconds memcache 调用耗时
	MCDurationsSeconds *prometheus.HistogramVec
	// RedisDurationsSeconds redis 调用耗时
	RedisDurationsSeconds *prometheus.HistogramVec
	// HTTPDurationsSeconds http 调用耗时
	HTTPDurationsSeconds *prometheus.HistogramVec
	// MQDurationsSeconds databus 调用耗时
	MQDurationsSeconds *prometheus.HistogramVec

	// LogTotal log 调用数量统计
	LogTotal *prometheus.CounterVec
	// JobTotal 定时任务数量统计
	JobTotal *prometheus.CounterVec

	// NetPoolHits 命中空闲连接数量
	NetPoolHits *prometheus.CounterVec
	// NetPoolMisses 未命中空闲连接数量
	NetPoolMisses *prometheus.CounterVec
	// NetPoolTimeouts 获取连接超时总数
	NetPoolTimeouts *prometheus.CounterVec
	// NetPoolStale 问题连接总数
	NetPoolStale *prometheus.CounterVec
	// NetPoolTotal 连接总数
	NetPoolTotal *prometheus.GaugeVec
	// NetPoolIdle 空闲连接总数
	NetPoolIdle *prometheus.GaugeVec

	// DBMaxOpenConnections 最大 DB 连接数
	DBMaxOpenConnections *prometheus.GaugeVec
	// DBOpenConnections 当前 DB 连接总数
	DBOpenConnections *prometheus.GaugeVec
	// DBInUseConnections 在用 DB 连接数
	DBInUseConnections *prometheus.GaugeVec
	// DBIdleConnections 空闲 DB 连接数
	DBIdleConnections *prometheus.GaugeVec
	// DBWaitCount 从 DB 连接池取不到连接需要等待的总数量
	DBWaitCount *prometheus.CounterVec
	// DBMaxIdleClosed 因为 SetMaxIdleConns 而被关闭的连接总数量
	DBMaxIdleClosed *prometheus.CounterVec
	// DBMaxLifetimeClosed 因为 SetConnMaxLifetime 而被关闭的连接总数量
	DBMaxLifetimeClosed *prometheus.CounterVec
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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