You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a counter, it represents the total number of metrics seen by the exporter, and by definition counters cannot decrease. I think what you are looking for is a metric for the current number of metrics the exporter knows about, which would have to be a separate gauge. Let's call it statsd_exporter_metrics_current or something? I'm happy to take a contribution to add that.
matthiasr
changed the title
metricsCount metric remain the same after metric been deleted by RemoveStaleMetrics
Gauge to track the current number of metrics known [was: metricsCount metric remain the same after metric been deleted by RemoveStaleMetrics]
Aug 18, 2024
@SuperQ the original metric statsd_exporter_metrics_total provides separated counters for each metric type, including counter, gauge, and observer, this could be useful
I was using
statsd_exporter/main.go
Lines 167 to 173 in 58769c7
Then I noticed, across all the reference of the metrics, these's no place to decrease the gauge.
even in the
statsd_exporter/pkg/registry/registry.go
Lines 381 to 396 in 58769c7
So I think if we add a decrease in this function, the metric number would show the real number of metric number
The text was updated successfully, but these errors were encountered: