metrics

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NonConditionMetricLabelNames = make([]string, 0)

	ConditionMetricLabelNames = make([]string, 0)

	NonConditionMetricLabels = make(map[string]string)

	ConditionMetricLabels = make(map[string]string)
)

Functions

func RefineConditionMetricLabels

func RefineConditionMetricLabels(labels map[string]string) prometheus.Labels

func RefineLabels

func RefineLabels(promLabels prometheus.Labels, newLabels map[string]string) prometheus.Labels

RefineLabels refines the given Prometheus Labels with values from a map `newLabels` Only overwrite a value if the corresponding key is present in the Prometheus' Labels already to avoid adding label names which are not defined in a metric's description. Note that non-alphanumeric characters from keys of `newLabels` are replaced by an underscore because Prometheus does not accept non-alphanumeric, non-underscore characters in label names.

func RefineNonConditionMetricLabels

func RefineNonConditionMetricLabels(labels map[string]string) prometheus.Labels

func SetUpLabelNames

func SetUpLabelNames(addKubeStandardLabels bool)

SetUpLabelNames initializes both non-conditional and conditional metric labels and label names.

Types

This section is empty.

Jump to

Keyboard shortcuts

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