prometheus / prometheus/client_python
[Question] Is "REGISTRY" meant to be a decorator for "Collectors"?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 876
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 1
Description
Browsing through the code I've found a function called write_to_textfile in the exposition module. This function signature looks like this:
def write_to_textfile(path, registry):
"""Write metrics to the given path.
pass
If you read the implementation of the function, turns out the expectation is not really a registry but instead anything that implements (something like an interface) the .collect() method.
Is that by design?
If so, would it be welcomed the addition of type hints throughout the code? I would be happy to add them and create 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 in the exposition module at write_to_textfile and compare its registry parameter with the .collect() behavior described in the issue. Before making changes, determine whether type hints throughout the Python codebase are wanted; done would require an agreed scope and maintainer decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100