esmetrics

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExternalSecretSubsystem            = "externalsecret"
	SyncCallsKey                       = "sync_calls_total"
	SyncCallsErrorKey                  = "sync_calls_error"
	ExternalSecretStatusConditionKey   = "status_condition"
	ExternalSecretReconcileDurationKey = "reconcile_duration"
)

Variables

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

	ConditionMetricLabelNames = make([]string, 0)

	NonConditionMetricLabels = make(map[string]string)

	ConditionMetricLabels = make(map[string]string)
)

Functions

func GetCounterVec

func GetCounterVec(key string) *prometheus.CounterVec

func GetGaugeVec

func GetGaugeVec(key string) *prometheus.GaugeVec

func RefineConditionMetricLabels

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

func RefineLabels

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

Refine 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 SetUpMetrics

func SetUpMetrics(addKubeStandardLabels bool)

Called at the root to set-up the metric logic using the config flags provided.

func UpdateExternalSecretCondition

func UpdateExternalSecretCondition(es *esv1beta1.ExternalSecret, condition *esv1beta1.ExternalSecretStatusCondition, value float64)

Types

This section is empty.

Jump to

Keyboard shortcuts

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