Skip to content

Commit

Permalink
remove duplicate scaler error metric
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Wozniak <[email protected]>
  • Loading branch information
wozniakjan committed Apr 12, 2024
1 parent ced62ff commit 0d4fc28
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg/metricscollector/prommetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ var (
},
[]string{"version", "git_commit", "goversion", "goos", "goarch"},
)
scalerErrorsTotalDeprecated = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: DefaultPromMetricsNamespace,
Subsystem: "scaler",
Name: "errors_total",
Help: "DEPRECATED - will be removed in 2.16 - use a `sum(scaler_errors_total{scaler!=\"\"})` over all scalers",
},
[]string{},
)
scalerMetricsValue = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: DefaultPromMetricsNamespace,
Expand Down Expand Up @@ -223,7 +214,6 @@ type PromMetrics struct {
}

func NewPromMetrics() *PromMetrics {
metrics.Registry.MustRegister(scalerErrorsTotalDeprecated)
metrics.Registry.MustRegister(scalerMetricsValue)
metrics.Registry.MustRegister(scalerMetricsLatencyDeprecated)
metrics.Registry.MustRegister(scalerMetricsLatency)
Expand Down Expand Up @@ -300,7 +290,6 @@ func (p *PromMetrics) RecordScalerError(namespace string, scaledResource string,
scalerErrors.With(getLabels(namespace, scaledResource, scaler, triggerIndex, metric, isScaledObject)).Inc()
scalerErrorsDeprecated.With(getLabels(namespace, scaledResource, scaler, triggerIndex, metric, isScaledObject)).Inc()
p.RecordScaledObjectError(namespace, scaledResource, err)
scalerErrorsTotalDeprecated.With(prometheus.Labels{}).Inc()
return
}
// initialize metric with 0 if not already set
Expand Down

0 comments on commit 0d4fc28

Please sign in to comment.