prometheus

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	/*
	 SentinelContainerImageInfo is built dynamically based on extraLabels configuration
	 It's initialized by calling BuildMetrics() at startup
	*/
	SentinelContainerImageInfo *prometheus.GaugeVec

	// SentinelImageChangesTotal tracks every time a container's image tag changes
	// This is a counter that increments whenever we detect an image update
	SentinelImageChangesTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "sentinel_image_changes_total",
			Help: "Total number of container image changes detected",
		},
		[]string{
			"workload_namespace",
			"workload_type",
			"workload_name",
			"container_name",
			"old_image_tag",
			"new_image_tag",
		},
	)
)

Functions

func BuildMetrics

func BuildMetrics(extraLabels []shared.ExtraLabel)

BuildMetrics constructs the Prometheus metrics with dynamic labels based on configuration This must be called before registering metrics with the Prometheus registry

func Init

func Init(metricsPort string, extraLabels []shared.ExtraLabel)

Init initializes and registers Prometheus metrics, then starts the metrics HTTP server

Types

This section is empty.

Jump to

Keyboard shortcuts

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