Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TypeHTTP ... TypeHTTP = "http" // TypeGRPCUnary ... TypeGRPCUnary = "unary" // TypeGRPCStream ... TypeGRPCStream = "stream" // TypeRedis ... TypeRedis = "redis" // TypeGorm ... TypeGorm = "gorm" // TypeWebsocket ... TypeWebsocket = "ws" // TypeMySQL ... TypeMySQL = "mysql" // DefaultNamespace ... DefaultNamespace = "ego" // Conn 连接信息 Conn = "conn" )
View Source
var ( // ServerHandleCounter ... ServerHandleCounter = CounterVecOpts{ Namespace: DefaultNamespace, Name: "server_handle_total", Labels: []string{"type", "method", "peer", "code", "uniform_code", "rpc_service"}, }.Build() // ServerStartedCounter ... ServerStartedCounter = CounterVecOpts{ Namespace: DefaultNamespace, Name: "server_started_total", Labels: []string{"type", "method", "peer", "rpc_service"}, }.Build() // ServerHandleHistogram ... ServerHandleHistogram = HistogramVecOpts{ Namespace: DefaultNamespace, Name: "server_handle_seconds", Labels: []string{"type", "method", "peer", "rpc_service"}, }.Build() // ClientHandleCounter ... ClientHandleCounter = CounterVecOpts{ Namespace: DefaultNamespace, Name: "client_handle_total", Labels: []string{"type", "name", "method", "peer", "code"}, }.Build() // ClientStartedCounter ... ClientStartedCounter = CounterVecOpts{ Namespace: DefaultNamespace, Name: "client_started_total", Labels: []string{"type", "name", "method", "peer"}, }.Build() // ClientHandleHistogram ... ClientHandleHistogram = HistogramVecOpts{ Namespace: DefaultNamespace, Name: "client_handle_seconds", Labels: []string{"type", "name", "method", "peer"}, }.Build() // ClientStatsGauge ... ClientStatsGauge = GaugeVecOpts{ Namespace: DefaultNamespace, Name: "client_stats_gauge", Labels: []string{"type", "name", "index"}, }.Build() // JobHandleCounter ... JobHandleCounter = CounterVecOpts{ Namespace: DefaultNamespace, Name: "job_handle_total", Labels: []string{"type", "name", "code"}, }.Build() // JobHandleHistogram ... JobHandleHistogram = HistogramVecOpts{ Namespace: DefaultNamespace, Name: "job_handle_seconds", Labels: []string{"type", "name"}, }.Build() // LibHandleHistogram ... // Deprecated LibHandleHistogram LibHandleHistogram = HistogramVecOpts{ Namespace: DefaultNamespace, Name: "lib_handle_seconds", Labels: []string{"type", "method", "address"}, }.Build() // LibHandleCounter ... // Deprecated LibHandleCounter LibHandleCounter = CounterVecOpts{ Namespace: DefaultNamespace, Name: "lib_handle_total", Labels: []string{"type", "method", "address", "code"}, }.Build() // LibHandleSummary ... // Deprecated LibHandleSummary LibHandleSummary = SummaryVecOpts{ Namespace: DefaultNamespace, Name: "lib_handle_stats", Labels: []string{"name", "status"}, }.Build() // CacheHandleCounter ... CacheHandleCounter = CounterVecOpts{ Namespace: DefaultNamespace, Name: "cache_handle_total", Labels: []string{"type", "name", "action", "code"}, }.Build() // CacheHandleHistogram ... CacheHandleHistogram = HistogramVecOpts{ Namespace: DefaultNamespace, Name: "cache_handle_seconds", Labels: []string{"type", "name", "action"}, }.Build() // BuildInfoGauge ... BuildInfoGauge = GaugeVecOpts{ Namespace: DefaultNamespace, Name: "build_info", Labels: []string{"name", "mode", "region", "zone", "app_version", "ego_version", "start_time", "build_time", "go_version"}, }.Build() )
Functions ¶
This section is empty.
Types ¶
type CounterVec ¶ added in v0.4.0
type CounterVec struct {
*prometheus.CounterVec
}
CounterVec ...
func (*CounterVec) Add ¶ added in v0.4.0
func (counter *CounterVec) Add(v float64, labels ...string)
Add ...
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 HistogramVec ¶ added in v0.4.0
type HistogramVec struct {
*prometheus.HistogramVec
}
HistogramVec ...
func (*HistogramVec) Observe ¶ added in v0.4.0
func (histogram *HistogramVec) Observe(v float64, labels ...string)
Observe ...
func (*HistogramVec) ObserveWithExemplar ¶ added in v0.9.1
func (histogram *HistogramVec) ObserveWithExemplar(v float64, exemplar prometheus.Labels, labels ...string)
ObserveWithExemplar ...
type HistogramVecOpts ¶
type HistogramVecOpts struct { Namespace string Subsystem string Name string Help string Labels []string Buckets []float64 }
HistogramVecOpts ...
type SummaryVec ¶ added in v0.4.0
type SummaryVec struct {
*prometheus.SummaryVec
}
SummaryVec ...
func (*SummaryVec) Observe ¶ added in v0.4.0
func (summary *SummaryVec) Observe(v float64, labels ...string)
Observe ...
type SummaryVecOpts ¶
type SummaryVecOpts struct { Namespace string Subsystem string Name string Help string Objectives map[float64]float64 Labels []string }
SummaryVecOpts ...
type TcpStatCollector ¶ added in v1.2.0
type TcpStatCollector struct {
ForeignPorts []uint64
}
func NewTCPStatCollector ¶ added in v1.2.0
func NewTCPStatCollector(foreignPorts []uint64) *TcpStatCollector
NewTCPStatCollector returns a new Collector exposing network stats.
func (*TcpStatCollector) Update ¶ added in v1.2.0
func (c *TcpStatCollector) Update() error
Click to show internal directories.
Click to hide internal directories.