metrics

package
v1.4.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collectors

type Collectors struct {
	Reloaded            *prometheus.CounterVec
	ReloadedByNamespace *prometheus.CounterVec

	ReconcileTotal    *prometheus.CounterVec   // Total reconcile calls by result
	ReconcileDuration *prometheus.HistogramVec // Time spent in reconcile/handler
	ActionTotal       *prometheus.CounterVec   // Total actions by workload kind and result
	ActionLatency     *prometheus.HistogramVec // Time from event to action applied
	SkippedTotal      *prometheus.CounterVec   // Skipped operations by reason
	QueueDepth        prometheus.Gauge         // Current queue depth
	QueueAdds         prometheus.Counter       // Total items added to queue
	QueueLatency      *prometheus.HistogramVec // Time spent in queue
	ErrorsTotal       *prometheus.CounterVec   // Errors by type
	RetriesTotal      prometheus.Counter       // Total retries
	EventsReceived    *prometheus.CounterVec   // Events received by type (add/update/delete)
	EventsProcessed   *prometheus.CounterVec   // Events processed by type and result
	WorkloadsScanned  *prometheus.CounterVec   // Workloads scanned by kind
	WorkloadsMatched  *prometheus.CounterVec   // Workloads matched for reload by kind
	// contains filtered or unexported fields
}

Collectors holds all Prometheus metrics collectors for Reloader.

func NewCollectors

func NewCollectors() Collectors

func SetupPrometheusEndpoint

func SetupPrometheusEndpoint() Collectors

func (*Collectors) RecordAction added in v1.4.13

func (c *Collectors) RecordAction(workloadKind string, result string, latency time.Duration)

RecordAction records a reload action on a workload.

func (*Collectors) RecordError added in v1.4.13

func (c *Collectors) RecordError(errorType string)

RecordError records an error by type.

func (*Collectors) RecordEventProcessed added in v1.4.13

func (c *Collectors) RecordEventProcessed(eventType string, resourceType string, result string)

RecordEventProcessed records an event being processed.

func (*Collectors) RecordEventReceived added in v1.4.13

func (c *Collectors) RecordEventReceived(eventType string, resourceType string)

RecordEventReceived records an event being received.

func (*Collectors) RecordQueueAdd added in v1.4.13

func (c *Collectors) RecordQueueAdd()

RecordQueueAdd records an item being added to the queue.

func (*Collectors) RecordQueueLatency added in v1.4.13

func (c *Collectors) RecordQueueLatency(latency time.Duration)

RecordQueueLatency records how long an item spent in the queue.

func (*Collectors) RecordReconcile added in v1.4.13

func (c *Collectors) RecordReconcile(result string, duration time.Duration)

RecordReconcile records a reconcile/handler invocation.

func (*Collectors) RecordReload added in v1.4.13

func (c *Collectors) RecordReload(success bool, namespace string)

RecordReload records a reload event with the given success status and namespace. Preserved for backward compatibility.

func (*Collectors) RecordRetry added in v1.4.13

func (c *Collectors) RecordRetry()

RecordRetry records a retry attempt.

func (*Collectors) RecordSkipped added in v1.4.13

func (c *Collectors) RecordSkipped(reason string)

RecordSkipped records a skipped operation with reason.

func (*Collectors) RecordWorkloadsMatched added in v1.4.13

func (c *Collectors) RecordWorkloadsMatched(kind string, count int)

RecordWorkloadsMatched records workloads matched for reload.

func (*Collectors) RecordWorkloadsScanned added in v1.4.13

func (c *Collectors) RecordWorkloadsScanned(kind string, count int)

RecordWorkloadsScanned records workloads scanned during a reconcile.

func (*Collectors) SetQueueDepth added in v1.4.13

func (c *Collectors) SetQueueDepth(depth int)

SetQueueDepth sets the current queue depth.

Jump to

Keyboard shortcuts

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