Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterVec ¶
type CounterVec interface { Inc(labels ...string) // Inc 增加1标签 Add(v float64, labels ...string) // Add 添加任意值标签 }
CounterVec 计数向量重写了 prometheus.CounterVec
func NewCounterVec ¶
func NewCounterVec(cfg *CounterVecOpts) CounterVec
NewCounterVec 封装 prometheus.NewCounterVec 为了增加 labels 参数
type CounterVecOpts ¶
type CounterVecOpts VectorOpts // CounterVecOpts 计数选项
type GaugeVec ¶
type GaugeVec interface { Set(v float64, labels ...string) // Set 设置标签 Inc(labels ...string) // Inc 增加1标签 Dec(labels ...string) // Dec 减少1标签 Add(v float64, labels ...string) // Add 添加任意值标签 Sub(v float64, labels ...string) // Sub 减少任意标签 }
func NewGaugeVec ¶
func NewGaugeVec(cfg *GaugeVecOpts) GaugeVec
NewGaugeVec 封装 prometheus.NewGaugeVec 为了增加 labels 参数
type GaugeVecOpts ¶
type GaugeVecOpts VectorOpts // GaugeVecOpts 指标向量选项
type HistogramVec ¶
type HistogramVec interface { // Observe adds observation v to labels. Observe(v int64, labels ...string) }
A HistogramVec interface represents a histogram vector.
func NewHistogramVec ¶
func NewHistogramVec(cfg *HistogramVecOpts) HistogramVec
NewHistogramVec returns a HistogramVec.
type HistogramVecOpts ¶
type HistogramVecOpts struct { VectorOpts Buckets []float64 //柱状图指标新增桶的概念 }
HistogramVecOpts 柱状图选项
Click to show internal directories.
Click to hide internal directories.