Skip to content

Commit

Permalink
fix: add missing metrics registration (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
clamoriniere authored Jul 5, 2024
1 parent dbe256f commit 642a80c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/datadoghq/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ var (
)

func init() {
sigmetrics.Registry.MustRegister(upscale)
sigmetrics.Registry.MustRegister(downscale)
sigmetrics.Registry.MustRegister(value)
sigmetrics.Registry.MustRegister(highwm)
sigmetrics.Registry.MustRegister(highwmV2)
Expand Down Expand Up @@ -324,6 +326,8 @@ func cleanupAssociatedMetrics(wpa *datadoghqv1alpha1.WatermarkPodAutoscaler, onl
highwm.Delete(promLabelsForWpa)
highwmV2.Delete(promLabelsForWpa)
value.Delete(promLabelsForWpa)
upscale.Delete(promLabelsForWpa)
downscale.Delete(promLabelsForWpa)
}
// TODO this only be cleaned up as part of the finalizer.
// Until the feature is moved to the Spec, updating the annotation to disable the feature will not clean up the metric.
Expand Down

0 comments on commit 642a80c

Please sign in to comment.