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
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 ¶
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 ¶
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 ¶
ResetFailedDeployment resets the FailedDeployment gauge for the given app.
func (*Metrics) SetArgoUnavailable ¶
SetArgoUnavailable sets the ArgocdUnavailable gauge.
type MetricsInterface ¶
type MetricsInterface interface {
AddProcessedDeployment(app string)
AddFailedDeployment(app string)
ResetFailedDeployment(app string)
AddInProgressTask()
RemoveInProgressTask()
}
MetricsInterface defines the interface for the metrics service. This is required for dependency injection and mocking in tests.