safeprom

package
v0.0.0-...-efaf4e0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: BSD-3-Clause Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter interface {
	prometheus.Metric

	Inc()
}

New Prometheus counter type that produces rounded counts of metrics for privacy preserving reasons

type CounterVec

type CounterVec struct {
	*prometheus.MetricVec
}

New prometheus vector type that will track Counter metrics accross multiple labels

func NewCounterVec

func NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *CounterVec

NewCounterVec will create a CounterVec but will not register it, users must register it themselves. The behaviour of this function is similar to github.com/prometheus/client_golang/prometheus

func NewCounterVecRegistered

func NewCounterVecRegistered(opts prometheus.CounterOpts, labelNames []string) *CounterVec

NewCounterVecRegistered will create a CounterVec and register it. The behaviour of this function is similar to github.com/prometheus/client_golang/prometheus/promauto

func (*CounterVec) With

func (v *CounterVec) With(labels prometheus.Labels) Counter

Helper function to return the underlying Counter metric from MetricVec

func (*CounterVec) WithLabelValues

func (v *CounterVec) WithLabelValues(lvs ...string) Counter

Helper function to return the underlying Counter metric from MetricVec

Jump to

Keyboard shortcuts

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