Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LazyCounter ¶
type LazyCounter struct { Counter prometheus.Counter Registry *prometheus.Registry // contains filtered or unexported fields }
LazyCounter wraps a prometheus Gauge but doesn't register itself until Set is called This avoids a bunch of registered metrics with "0" initial values showing up when scraped, and generally helps the resulting data in graphs look cleaner
func (*LazyCounter) Add ¶
func (l *LazyCounter) Add(val float64)
Add wraps prometheus.Counter.Add with a call to MustRegister
func (*LazyCounter) Inc ¶
func (l *LazyCounter) Inc()
Inc wraps prometheus.Counter.Inc with a call to MustRegister
func (*LazyCounter) Unregister ¶
func (l *LazyCounter) Unregister()
Unregister removes the metric from the Registry to stop reporting it until it is registered again
type LazyGauge ¶
type LazyGauge struct { Gauge prometheus.Gauge Registry *prometheus.Registry // contains filtered or unexported fields }
LazyGauge wraps a prometheus Gauge but doesn't register itself until Set is called This avoids a bunch of registered metrics with "0" initial values showing up when scraped, and generally helps the resulting data in graphs look cleaner
func (*LazyGauge) Unregister ¶
func (l *LazyGauge) Unregister()
Unregister removes the metric from the Registry to stop reporting it until it is registered again