metrics

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteMetricsForPod added in v0.11.0

func DeleteMetricsForPod(pod *corev1.Pod)

func EnableMetrics

func EnableMetrics(address string)

func GetPodQueue added in v0.11.0

func GetPodQueue() workqueue.DelayingInterface

func GetRegistry added in v0.11.0

func GetRegistry() *prometheus.Registry

func ListMetricsWithPod added in v0.11.0

func ListMetricsWithPod() []*prometheus.MetricVec

func NewCounterVecWithPod added in v0.11.0

func NewCounterVecWithPod(opts prometheus.CounterOpts, labels []string) *prometheus.CounterVec

NewCounterVecWithPod is a wrapper around prometheus.NewCounterVec that also registers the metric to be cleaned up when a pod is deleted. It should be used only to register metrics that have "pod" and "namespace" labels.

func NewGaugeVecWithPod added in v0.11.0

func NewGaugeVecWithPod(opts prometheus.GaugeOpts, labels []string) *prometheus.GaugeVec

NewGaugeVecWithPod is a wrapper around prometheus.NewGaugeVec that also registers the metric to be cleaned up when a pod is deleted. It should be used only to register metrics that have "pod" and "namespace" labels.

func NewHistogramVecWithPod added in v0.11.0

func NewHistogramVecWithPod(opts prometheus.HistogramOpts, labels []string) *prometheus.HistogramVec

NewHistogramVecWithPod is a wrapper around prometheus.NewHistogramVec that also registers the metric to be cleaned up when a pod is deleted. It should be used only to register metrics that have "pod" and "namespace" labels.

func RegisterPodDeleteHandler added in v0.11.0

func RegisterPodDeleteHandler()

RegisterPodDeleteHandler registers handler for deleting metrics associated with deleted pods. Without it, Tetragon kept exposing stale metrics for deleted pods. This was causing continuous increase in memory usage in Tetragon agent as well as in the metrics scraper.

func StartPodDeleteHandler added in v0.11.0

func StartPodDeleteHandler()

Types

This section is empty.

Jump to

Keyboard shortcuts

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