metricutil

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCounterStartingAtZero

func NewCounterStartingAtZero(opts prometheus.CounterOpts) prometheus.Counter

NewCounterStartingAtZero initializes a new Prometheus counter with an initial observation of zero. Used for to guarantee the existence of the specific metric.

func NewCounterVecStartingAtZero

func NewCounterVecStartingAtZero(opts prometheus.CounterOpts, labels []string, labelValues map[string][]string) *prometheus.CounterVec

NewCounterVecStartingAtZero initializes a new Prometheus counter with an initial observation of zero for every possible value of each label. Used for the sake of consistency among all the possible labels and values.

func SanitizeLabelName

func SanitizeLabelName(name string) (string, error)

SanitizeLabelName removes all invalid chars from the label name. If the label name is empty or contains only invalid chars, it will return an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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