Skip to content

Commit

Permalink
Metrics use shootName (#1565)
Browse files Browse the repository at this point in the history
metrics dimension name changed
  • Loading branch information
jaroslaw-pieszka authored Dec 11, 2024
1 parent 0e9e359 commit 148d69a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions internal/btpmanager/credentials/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ func (s *Manager) ReconcileAll(jobReconciliationDelay time.Duration, metrics *Me
func (s *Manager) updateMetrics(metrics *Metrics, instance internal.Instance, runtimeSkipped bool) {
if metrics != nil {
if runtimeSkipped {
metrics.skippedSecrets.With(prometheus.Labels{"runtime": instance.RuntimeID, "state": "skipped"}).Set(float64(1))
metrics.skippedSecrets.With(prometheus.Labels{"runtime": instance.RuntimeID, "state": "reconciled"}).Set(float64(0))
metrics.skippedSecrets.With(prometheus.Labels{"shoot": instance.InstanceDetails.ShootName, "state": "skipped"}).Set(float64(1))
metrics.skippedSecrets.With(prometheus.Labels{"shoot": instance.InstanceDetails.ShootName, "state": "reconciled"}).Set(float64(0))
} else {
metrics.skippedSecrets.With(prometheus.Labels{"runtime": instance.RuntimeID, "state": "reconciled"}).Set(float64(1))
metrics.skippedSecrets.With(prometheus.Labels{"runtime": instance.RuntimeID, "state": "skipped"}).Set(float64(0))
metrics.skippedSecrets.With(prometheus.Labels{"shoot": instance.InstanceDetails.ShootName, "state": "reconciled"}).Set(float64(1))
metrics.skippedSecrets.With(prometheus.Labels{"shoot": instance.InstanceDetails.ShootName, "state": "skipped"}).Set(float64(0))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/btpmanager/credentials/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func NewMetrics(reg prometheus.Registerer, namespace string) *Metrics {
Namespace: namespace,
Name: "reconciled_secrets",
Help: "Reconciled secrets.",
}, []string{"runtime", "state"}),
}, []string{"shoot", "state"}),
}
reg.MustRegister(m.skippedSecrets)
return m
Expand Down

0 comments on commit 148d69a

Please sign in to comment.