Versions in this module Expand all Collapse all v1 v1.23.2 Dec 6, 2022 Changes in this version + const FlagOfForbideGzip + const FlagOfPushProcessMetrics + func InitPush(pushURL string, interval time.Duration, extraLabels string, ...) error + func InitPushExt(pushURL string, interval time.Duration, extraLabels string, ...) error + func InitPushProcessMetrics(pushURL string, interval time.Duration, extraLabels string) error + func InitPushWithFlags(pushURL string, interval time.Duration, extraLabels string, flags uint64) error + func ListMetricNames() []string + func RegisterSet(s *Set) + func UnregisterAllMetrics() + func UnregisterMetric(name string) bool + func UnregisterSet(s *Set) + func WriteFDMetrics(w io.Writer) + func WriteProcessMetrics(w io.Writer) + func WritePrometheus(w io.Writer, exposeProcessMetrics bool) + type Counter struct + func GetOrCreateCounter(name string) *Counter + func NewCounter(name string) *Counter + func (c *Counter) Add(n int) + func (c *Counter) Dec() + func (c *Counter) Get() uint64 + func (c *Counter) Inc() + func (c *Counter) Set(n uint64) + type FloatCounter struct + func GetOrCreateFloatCounter(name string) *FloatCounter + func NewFloatCounter(name string) *FloatCounter + func (fc *FloatCounter) Add(n float64) + func (fc *FloatCounter) Get() float64 + func (fc *FloatCounter) Set(n float64) + func (fc *FloatCounter) Sub(n float64) + type Gauge struct + func GetOrCreateGauge(name string, f func() float64) *Gauge + func NewGauge(name string, f func() float64) *Gauge + func (g *Gauge) Get() float64 + type Histogram struct + func GetOrCreateHistogram(name string) *Histogram + func NewHistogram(name string) *Histogram + func (h *Histogram) Reset() + func (h *Histogram) Update(v float64) + func (h *Histogram) UpdateDuration(startTime time.Time) + func (h *Histogram) VisitNonZeroBuckets(f func(vmrange string, count uint64)) + type Set struct + func GetDefaultSet() *Set + func NewSet() *Set + func (s *Set) GetOrCreateCounter(name string) *Counter + func (s *Set) GetOrCreateFloatCounter(name string) *FloatCounter + func (s *Set) GetOrCreateGauge(name string, f func() float64) *Gauge + func (s *Set) GetOrCreateHistogram(name string) *Histogram + func (s *Set) GetOrCreateSummary(name string) *Summary + func (s *Set) GetOrCreateSummaryExt(name string, window time.Duration, quantiles []float64) *Summary + func (s *Set) InitPush(pushURL string, interval time.Duration, extraLabels string) error + func (s *Set) ListMetricNames() []string + func (s *Set) NewCounter(name string) *Counter + func (s *Set) NewFloatCounter(name string) *FloatCounter + func (s *Set) NewGauge(name string, f func() float64) *Gauge + func (s *Set) NewHistogram(name string) *Histogram + func (s *Set) NewSummary(name string) *Summary + func (s *Set) NewSummaryExt(name string, window time.Duration, quantiles []float64) *Summary + func (s *Set) UnregisterAllMetrics() + func (s *Set) UnregisterMetric(name string) bool + func (s *Set) WritePrometheus(w io.Writer) + type Summary struct + func GetOrCreateSummary(name string) *Summary + func GetOrCreateSummaryExt(name string, window time.Duration, quantiles []float64) *Summary + func NewSummary(name string) *Summary + func NewSummaryExt(name string, window time.Duration, quantiles []float64) *Summary + func (sm *Summary) Update(v float64) + func (sm *Summary) UpdateDuration(startTime time.Time)