prometheus

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	FailedDeployment     *prometheus.GaugeVec
	ProcessedDeployments *prometheus.CounterVec
	ArgocdUnavailable    prometheus.Gauge
	InProgressTasks      prometheus.Gauge
}

Metrics contains all the prometheus collectors.

func NewMetrics added in v0.10.0

func NewMetrics(reg prometheus.Registerer) *Metrics

NewMetrics creates and registers the metrics with the provided Registerer.

func (*Metrics) AddFailedDeployment

func (m *Metrics) AddFailedDeployment(app string)

AddFailedDeployment increments the FailedDeployment gauge for the given app.

func (*Metrics) AddInProgressTask added in v0.8.3

func (m *Metrics) AddInProgressTask()

AddInProgressTask increments the InProgressTasks gauge.

func (*Metrics) AddProcessedDeployment

func (m *Metrics) AddProcessedDeployment(app string)

AddProcessedDeployment increments the ProcessedDeployments counter.

func (*Metrics) RemoveInProgressTask added in v0.8.3

func (m *Metrics) RemoveInProgressTask()

RemoveInProgressTask decrements the InProgressTasks gauge.

func (*Metrics) ResetFailedDeployment

func (m *Metrics) ResetFailedDeployment(app string)

ResetFailedDeployment resets the FailedDeployment gauge for the given app.

func (*Metrics) SetArgoUnavailable

func (m *Metrics) SetArgoUnavailable(unavailable bool)

SetArgoUnavailable sets the ArgocdUnavailable gauge.

type MetricsInterface

type MetricsInterface interface {
	AddProcessedDeployment(app string)
	AddFailedDeployment(app string)
	ResetFailedDeployment(app string)
	SetArgoUnavailable(unavailable bool)
	AddInProgressTask()
	RemoveInProgressTask()
}

MetricsInterface defines the interface for the metrics service. This is required for dependency injection and mocking in tests.

Jump to

Keyboard shortcuts

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