Documentation
¶
Index ¶
- func DeleteMetricsForPod(pod *corev1.Pod)
- func EnableMetrics(address string)
- func GetPodQueue() workqueue.DelayingInterface
- func GetRegistry() *prometheus.Registry
- func ListMetricsWithPod() []*prometheus.MetricVec
- func NewCounterVecWithPod(opts prometheus.CounterOpts, labels []string) *prometheus.CounterVec
- func NewGaugeVecWithPod(opts prometheus.GaugeOpts, labels []string) *prometheus.GaugeVec
- func NewHistogramVecWithPod(opts prometheus.HistogramOpts, labels []string) *prometheus.HistogramVec
- func RegisterPodDeleteHandler()
- func StartPodDeleteHandler()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteMetricsForPod ¶ added in v0.11.0
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.