Documentation ¶
Index ¶
- Constants
- Variables
- func AddCounter(name string, v float64)
- func AddCounterVec(name string, v float64, labelValues ...string)
- func InCounterVec(name string, labelValues ...string)
- func IncCounter(name string)
- func Init(constLabels map[string]string)
- func ObserveHistogram(name string, v float64)
- func Register(registerer prometheus.Registerer)
- func SetGauge(name string, v float64)
- type Prometheus
- func (p *Prometheus) Counter(name string) prometheus.Counter
- func (p *Prometheus) CounterVec(name string) *prometheus.CounterVec
- func (p *Prometheus) CounterVecWithLabelValues(name string, labelValues ...string) prometheus.Counter
- func (p *Prometheus) CounterVecWithLabels(name string, labels prometheus.Labels) prometheus.Counter
- func (p *Prometheus) Gauge(name string) prometheus.Gauge
- func (p *Prometheus) GaugeVec(name string) *prometheus.GaugeVec
- func (p *Prometheus) Histogram(name string) prometheus.Histogram
- func (p *Prometheus) RegisterCounter(name, help string, labels map[string]string)
- func (p *Prometheus) RegisterCounterVec(name, help string, constLabels map[string]string, varLabels []string)
- func (p *Prometheus) RegisterGauge(name, help string, labels map[string]string)
- func (p *Prometheus) RegisterGaugeVec(name, help string, constLabels map[string]string, varLabels []string)
- func (p *Prometheus) RegisterHistogram(name, help string, buckets []float64, labels map[string]string)
- func (p *Prometheus) SetConstLabels(m map[string]string)
Constants ¶
View Source
const ( // Counters & CounterVectors CntGatewayIncomingHttpMessage = "gateway_incoming_http_message" CntGatewayIncomingWebsocketMessage = "gateway_incoming_websocket_message" CntGatewayOutgoingHttpMessage = "gateway_outgoing_http_message" CntGatewayOutgoingWebsocketMessage = "gateway_outgoing_websocket_message" CntTunnelIncomingMessage = "tunnel_incoming_message" CntTunnelOutgoingMessage = "tunnel_outgoing_message" CntStoreConflicts = "store_conflicts" // Gauges & GaugeVectors GaugeActiveWebsocketConnections = "gateway_active_websocket_conns" // Histograms HistGatewayRequestTime = "gateway_request_time" HistTunnelRequestTime = "tunnel_request_time" HistTunnelRoundtripTime = "tunnel_roundtrip_time" )
Variables ¶
View Source
var ( SizeBucketKB = []float64{1, 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560} TimeBucketMS = []float64{0.1, 0.5, 1, 10, 20, 50, 100, 500, 1000, 2000, 3000, 5000} TimeBucketMicroS = []float64{1, 2, 5, 10, 20, 50, 100, 200, 300, 400, 500, 1000, 2000, 5000, 10000} )
Functions ¶
func AddCounter ¶
func AddCounterVec ¶
func InCounterVec ¶
func IncCounter ¶
func IncCounter(name string)
func ObserveHistogram ¶
func Register ¶
func Register(registerer prometheus.Registerer)
Types ¶
type Prometheus ¶
type Prometheus struct {
// contains filtered or unexported fields
}
Prometheus
func NewPrometheus ¶
func NewPrometheus(ns string, constLabels map[string]string) *Prometheus
func (*Prometheus) Counter ¶
func (p *Prometheus) Counter(name string) prometheus.Counter
func (*Prometheus) CounterVec ¶
func (p *Prometheus) CounterVec(name string) *prometheus.CounterVec
func (*Prometheus) CounterVecWithLabelValues ¶
func (p *Prometheus) CounterVecWithLabelValues(name string, labelValues ...string) prometheus.Counter
func (*Prometheus) CounterVecWithLabels ¶
func (p *Prometheus) CounterVecWithLabels(name string, labels prometheus.Labels) prometheus.Counter
func (*Prometheus) Gauge ¶
func (p *Prometheus) Gauge(name string) prometheus.Gauge
func (*Prometheus) GaugeVec ¶
func (p *Prometheus) GaugeVec(name string) *prometheus.GaugeVec
func (*Prometheus) Histogram ¶
func (p *Prometheus) Histogram(name string) prometheus.Histogram
func (*Prometheus) RegisterCounter ¶
func (p *Prometheus) RegisterCounter(name, help string, labels map[string]string)
func (*Prometheus) RegisterCounterVec ¶
func (p *Prometheus) RegisterCounterVec(name, help string, constLabels map[string]string, varLabels []string)
func (*Prometheus) RegisterGauge ¶
func (p *Prometheus) RegisterGauge(name, help string, labels map[string]string)
func (*Prometheus) RegisterGaugeVec ¶
func (p *Prometheus) RegisterGaugeVec(name, help string, constLabels map[string]string, varLabels []string)
func (*Prometheus) RegisterHistogram ¶
func (p *Prometheus) RegisterHistogram(name, help string, buckets []float64, labels map[string]string)
func (*Prometheus) SetConstLabels ¶
func (p *Prometheus) SetConstLabels(m map[string]string)
Click to show internal directories.
Click to hide internal directories.