Documentation
¶
Index ¶
- Variables
- func Register(sets ...*Set)
- func Serve(addr string)
- type Counter
- type CounterVec
- func (c *CounterVec) AddFloat64(value float64, labels ...string)
- func (c *CounterVec) AddInt(value int, labels ...string)
- func (c *CounterVec) AddInt64(value int64, labels ...string)
- func (c *CounterVec) AddUint64(value uint64, labels ...string)
- func (c *CounterVec) Inc(labels ...string)
- func (g *CounterVec) Native() *prometheus.CounterVec
- type Gauge
- type GaugeVec
- func (g *GaugeVec) Dec(labels ...string)
- func (g *GaugeVec) Inc(labels ...string)
- func (g *GaugeVec) Native() *prometheus.GaugeVec
- func (g *GaugeVec) SetFloat64(value float64, labels ...string)
- func (g *GaugeVec) SetInt(value int, labels ...string)
- func (g *GaugeVec) SetInt64(value int64, labels ...string)
- func (g *GaugeVec) SetUint64(value uint64, labels ...string)
- type HeadBlockNum
- type HeadTimeDrift
- type Histogram
- func (h *Histogram) Native() prometheus.Histogram
- func (h *Histogram) ObserveDuration(value time.Duration)
- func (h *Histogram) ObserveFloat64(value float64)
- func (h *Histogram) ObserveInt(value int64)
- func (h *Histogram) ObserveInt64(value int64)
- func (h *Histogram) ObserveSince(value time.Time)
- func (h *Histogram) ObserveUint64(value int64)
- type HistogramVec
- func (h *HistogramVec) Native() *prometheus.HistogramVec
- func (h *HistogramVec) ObserveDuration(value time.Duration, labels ...string)
- func (h *HistogramVec) ObserveFloat64(value float64, labels ...string)
- func (h *HistogramVec) ObserveInt(value int64, labels ...string)
- func (h *HistogramVec) ObserveInt64(value int64, labels ...string)
- func (h *HistogramVec) ObserveSince(value time.Time, labels ...string)
- func (h *HistogramVec) ObserveUint64(value int64, labels ...string)
- type Metric
- type Option
- type Set
- func (s *Set) NewCounter(name string, helpChunks ...string) *Counter
- func (s *Set) NewCounterVec(name string, labels []string, helpChunks ...string) *CounterVec
- func (s *Set) NewGauge(name string, helpChunks ...string) *Gauge
- func (s *Set) NewGaugeVec(name string, labels []string, helpChunks ...string) *GaugeVec
- func (s *Set) NewHeadBlockNumber(service string) *HeadBlockNum
- func (s *Set) NewHeadTimeDrift(service string) *HeadTimeDrift
- func (s *Set) NewHistogram(name string, helpChunks ...string) *Histogram
- func (s *Set) NewHistogramVec(name string, labels []string, helpChunks ...string) *HistogramVec
- func (s *Set) Register()
Constants ¶
This section is empty.
Variables ¶
View Source
var NoOpPrometheusRegister = func(c ...prometheus.Collector) {}
View Source
var PrometheusRegister = prometheus.MustRegister
Functions ¶
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func (*Counter) AddFloat64 ¶
func (*Counter) Native ¶
func (c *Counter) Native() prometheus.Counter
type CounterVec ¶
type CounterVec struct {
// contains filtered or unexported fields
}
func (*CounterVec) AddFloat64 ¶
func (c *CounterVec) AddFloat64(value float64, labels ...string)
func (*CounterVec) AddInt ¶
func (c *CounterVec) AddInt(value int, labels ...string)
func (*CounterVec) AddInt64 ¶
func (c *CounterVec) AddInt64(value int64, labels ...string)
func (*CounterVec) AddUint64 ¶
func (c *CounterVec) AddUint64(value uint64, labels ...string)
func (*CounterVec) Inc ¶
func (c *CounterVec) Inc(labels ...string)
func (*CounterVec) Native ¶
func (g *CounterVec) Native() *prometheus.CounterVec
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
func (*Gauge) Native ¶
func (g *Gauge) Native() prometheus.Gauge
func (*Gauge) SetFloat64 ¶
type GaugeVec ¶
type GaugeVec struct {
// contains filtered or unexported fields
}
func (*GaugeVec) Native ¶
func (g *GaugeVec) Native() *prometheus.GaugeVec
func (*GaugeVec) SetFloat64 ¶
type HeadBlockNum ¶
type HeadBlockNum struct {
// contains filtered or unexported fields
}
func (*HeadBlockNum) SetUint64 ¶
func (h *HeadBlockNum) SetUint64(blockNum uint64)
type HeadTimeDrift ¶
type HeadTimeDrift struct {
// contains filtered or unexported fields
}
func (*HeadTimeDrift) SetBlockTime ¶
func (h *HeadTimeDrift) SetBlockTime(blockTime time.Time)
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
func (*Histogram) Native ¶
func (h *Histogram) Native() prometheus.Histogram
func (*Histogram) ObserveDuration ¶
func (*Histogram) ObserveFloat64 ¶
func (*Histogram) ObserveInt ¶
func (*Histogram) ObserveInt64 ¶
func (*Histogram) ObserveSince ¶
func (*Histogram) ObserveUint64 ¶
type HistogramVec ¶
type HistogramVec struct {
// contains filtered or unexported fields
}
func (*HistogramVec) Native ¶
func (h *HistogramVec) Native() *prometheus.HistogramVec
func (*HistogramVec) ObserveDuration ¶
func (h *HistogramVec) ObserveDuration(value time.Duration, labels ...string)
func (*HistogramVec) ObserveFloat64 ¶
func (h *HistogramVec) ObserveFloat64(value float64, labels ...string)
func (*HistogramVec) ObserveInt ¶
func (h *HistogramVec) ObserveInt(value int64, labels ...string)
func (*HistogramVec) ObserveInt64 ¶
func (h *HistogramVec) ObserveInt64(value int64, labels ...string)
func (*HistogramVec) ObserveSince ¶
func (h *HistogramVec) ObserveSince(value time.Time, labels ...string)
func (*HistogramVec) ObserveUint64 ¶
func (h *HistogramVec) ObserveUint64(value int64, labels ...string)
type Option ¶
type Option func(s *Set)
func PrefixNameWith ¶
PrefixNameWith will prefix all metric of this given set using the following prefix.
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func NewSet ¶
NewSet creates a set of metrics that can then be used to create a varieties of specific metrics (Gauge, Counter, Histogram).
func (*Set) NewCounterVec ¶
func (s *Set) NewCounterVec(name string, labels []string, helpChunks ...string) *CounterVec
func (*Set) NewGaugeVec ¶
func (*Set) NewHeadBlockNumber ¶
func (s *Set) NewHeadBlockNumber(service string) *HeadBlockNum
func (*Set) NewHeadTimeDrift ¶
func (s *Set) NewHeadTimeDrift(service string) *HeadTimeDrift
func (*Set) NewHistogramVec ¶
func (s *Set) NewHistogramVec(name string, labels []string, helpChunks ...string) *HistogramVec
Click to show internal directories.
Click to hide internal directories.