prometheus / prometheus/client_python
Possibility to remove metrics
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 876
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 1
Description
I have a use case where I need to remove certain sub-metrics from a labeled metric. Ideally I could remove a bunch of them with a wildcard filter. The idea is to extend the .remove() method and allow for keyword arguments according to the defined label names as in the .labels(...) method. By not providing certain label names one could apply a wildcard operation.
Also would be happy to make a PR.
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.
Research direction
Start by locating the metric .remove() implementation and the .labels(...) handling in the Python client. Define the behavior for keyword label arguments, including omitted labels as wildcards, and consider how removing multiple matching sub-metrics should be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100