monitoring

package
v0.6.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRingPopStatsD

func GetRingPopStatsD(conf *conf.StatsdConfig) bark.StatsReporter

Types

type GaugeMonitor

type GaugeMonitor interface {
	AddGauge(name string, labels map[string]string, delta float64)
}

GaugeMonitor is an optional extension that lets a Monitor implementation publish additive gauge activity. Existing Monitor implementations do not need to implement this to remain compatible with the scheduler; components that publish gauges check for the extension with a type assertion.

type Monitor

type Monitor interface {
	IncCounter(name string, labels map[string]string, value int)
	RecordTiming(name string, labels map[string]string, duration time.Duration)
}

type PrometheusMonitor

type PrometheusMonitor struct {
	Counters   map[string]*prometheus.CounterVec
	Histograms map[string]*prometheus.HistogramVec
	Gauges     map[string]*prometheus.GaugeVec
	Mu         sync.RWMutex
	// contains filtered or unexported fields
}

func NewPrometheusMonitor

func NewPrometheusMonitor() *PrometheusMonitor

func (*PrometheusMonitor) AddGauge

func (p *PrometheusMonitor) AddGauge(name string, labels map[string]string, delta float64)

AddGauge changes a gauge value by delta. Additive updates let callers count actual concurrent activity (for example, two polling loops for the same app/partition on the same node) instead of overwriting the value with Set(1), which would hide duplicates.

func (*PrometheusMonitor) IncCounter

func (p *PrometheusMonitor) IncCounter(name string, labels map[string]string, value int)

func (*PrometheusMonitor) RecordTiming

func (p *PrometheusMonitor) RecordTiming(name string, labels map[string]string, duration time.Duration)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址