Gauge to track the current number of metrics known [was: metricsCount metric remain the same after metric been deleted by RemoveStaleMetrics]
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- go
- Domain
- observability-sre
Research direction
Start with the metric definition in main.go at lines 167-173 and the RemoveStaleMetrics function in pkg/registry/registry.go at lines 381-396. Trace how stale metrics are removed when the configured TTL expires, then verify that the gauge reflects the current number of known metrics after deletion.
Written by the indexing model from the issue text.
Description
I was using https://github.com/prometheus/statsd_exporter/blob/58769c7b4d128e7ceae1cf8d893260ed5b5afa4d/main.go#L167-L173 to track the metric number of statsd exporter, but found that this metric never drops, even if I set the ttl parameter in config file.
Then I noticed, across all the reference of the metrics, these's no place to decrease the gauge.
So I think if we add a decrease in this function, the metric number would show the real number of metric number
- Dominant language
- Go
- Stars
- 987
- Forks
- 259
- Avg merge
- 22h 10m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prometheus/statsd_exporter
-
enhancement help wanted
Difficulty 3/5 1-2 days Newbie friendliness 55/100
prometheus/statsd_exporter#637 · 7 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
prometheus/statsd_exporter#597 ·
-
breaking
Difficulty 4/5 3-5 days Newbie friendliness 35/100
prometheus/statsd_exporter#580 · 1 reaction ·
-
[breaking] Reduce allocations in `LineToEvents` by returning a single event instead of an slice Openenhancement library
Difficulty 5/5 Over a week Newbie friendliness 35/100
prometheus/statsd_exporter#577 · 1 comment ·
-
enhancement library
Difficulty 5/5 Over a week Newbie friendliness 35/100
prometheus/statsd_exporter#576 · 2 comments ·
All issues in prometheus/statsd_exporter
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100