Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TypeHTTP ... TypeHTTP = "http" // TypeGRPCUnary ... TypeGRPCUnary = "unary" // TypeGRPCStream ... TypeGRPCStream = "stream" // TypeRedis ... TypeRedis = "redis" TypeGorm = "gorm" // TypeRocketMQ ... TypeRocketMQ = "rocketmq" // TypeWebsocket ... TypeWebsocket = "ws" // TypeMySQL ... TypeMySQL = "mysql" // TypeLocalCache ... TypeLocalCache = "localCache" // TypeTableStore TypeTableStore = "tstore" // CodeJob CodeJobSuccess = "ok" // CodeJobFail ... CodeJobFail = "fail" // CodeJobReentry ... CodeJobReentry = "reentry" // CodeCache CodeCacheMiss = "miss" // CodeCacheHit ... CodeCacheHit = "hit" )
View Source
var ( // ServerHandleCounter ... ServerHandleCounter = CounterVecOpts{ Namespace: constant.DefaultNamespace, Name: "server_handle_total", Labels: []string{"type", "method", "client", "code"}, }.Build() // ServerHandleHistogram ... ServerHandleHistogram = HistogramVecOpts{ Namespace: constant.DefaultNamespace, Name: "server_handle_seconds", Labels: []string{"type", "method", "client"}, }.Build() // ClientHandleCounter ... ClientHandleCounter = CounterVecOpts{ Namespace: constant.DefaultNamespace, Name: "client_handle_total", Labels: []string{"type", "name", "method", "server", "code"}, }.Build() // ClientHandleHistogram ... ClientHandleHistogram = HistogramVecOpts{ Namespace: constant.DefaultNamespace, Name: "client_handle_seconds", Labels: []string{"type", "name", "method", "server"}, }.Build() // JobHandleCounter ... JobHandleCounter = CounterVecOpts{ Namespace: constant.DefaultNamespace, Name: "job_handle_total", Labels: []string{"type", "name", "code"}, }.Build() // JobHandleHistogram ... JobHandleHistogram = HistogramVecOpts{ Namespace: constant.DefaultNamespace, Name: "job_handle_seconds", Labels: []string{"type", "name"}, }.Build() LibHandleHistogram = HistogramVecOpts{ Namespace: constant.DefaultNamespace, Name: "lib_handle_seconds", Labels: []string{"type", "method", "address"}, }.Build() // LibHandleCounter ... LibHandleCounter = CounterVecOpts{ Namespace: constant.DefaultNamespace, Name: "lib_handle_total", Labels: []string{"type", "method", "address", "code"}, }.Build() LibHandleSummary = SummaryVecOpts{ Namespace: constant.DefaultNamespace, Name: "lib_handle_stats", Labels: []string{"name", "status"}, }.Build() // CacheHandleCounter ... CacheHandleCounter = CounterVecOpts{ Namespace: constant.DefaultNamespace, Name: "cache_handle_total", Labels: []string{"type", "name", "method", "code"}, }.Build() // CacheHandleHistogram ... CacheHandleHistogram = HistogramVecOpts{ Namespace: constant.DefaultNamespace, Name: "cache_handle_seconds", Labels: []string{"type", "name", "method"}, }.Build() // BuildInfoGauge ... BuildInfoGauge = GaugeVecOpts{ Namespace: constant.DefaultNamespace, Name: "build_info", Labels: []string{"name", "id", "env", "region", "zone", "version", "go_version"}, }.Build() // LogLevelCounter ... LogLevelCounter = NewCounterVec("log_level_total", []string{"name", "lv"}) // ClientStatsGauge ... ClientStatsGauge = GaugeVecOpts{ Namespace: constant.DefaultNamespace, Name: "client_stats_gauge", Labels: []string{"type", "name", "index"}, }.Build() // CustomizedHandleGauge 业务自定义 gauge. CustomizedHandleGauge = NewGaugeVec("customized_handle_gauge", []string{"type"}) // CustomizedHandleCounter 业务自定义 counter. CustomizedHandleCounter = NewCounterVec("customized_handle_total", []string{"type"}) // CustomizedHandleHistogram 业务自定义 histogram. CustomizedHandleHistogram = NewHistogramVec("customized_handle_seconds", []string{"type"}) )
Functions ¶
func NewHistogramVec ¶
NewHistogramVec ...
Types ¶
type CounterVecOpts ¶
type CounterVecOpts struct { Namespace string Subsystem string Name string Help string Labels []string }
CounterVecOpts ...
type GaugeVecOpts ¶
type GaugeVecOpts struct { Namespace string Subsystem string Name string Help string Labels []string }
GaugeVecOpts ...
type HistogramVecOpts ¶
type HistogramVecOpts struct { Namespace string Subsystem string Name string Help string Labels []string Buckets []float64 }
HistogramVecOpts ...
type Metrics ¶
type Metrics interface { prometheus.Registerer prometheus.Gatherer BulkRegister(...prometheus.Collector) error }
Click to show internal directories.
Click to hide internal directories.