prometheus / prometheus/client_python
Would it be nice to document `Registry`, `Collector` and metric classes?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 876
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 1
Description
Hi guys. Thanks for providing this great library for making monitoring fun and easy in python. It's my Day 1 with this package. The README provided a very quick introduction but I was also puzzled at the following question:
- Seems we defined some metric classes, but not assigned to any other things. The web server was started but it seemed magical that the server somehow knows the metric class objects.
This puzzle was gone after I checked out the source codes (which is very fun to read, thanks!) and realized that there's a global REGISTRY object. The server app takes a registry object which is by default the global REGISTRY, and each Collector object, in the __init__ method, also accepts a registry object, which by default is also REGISTRY.
I think it would be nice if there could be some API reference sections/pages. I'd be glad to contribute such a section, but would like to hear any comment from the community, like the necessity, proposed format, etc.
Cheers!
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 reviewing the README and the source areas containing the global REGISTRY, Registry, Collector, metric classes, and the server app. Clarify the community's preferred API-reference scope and format before writing. Done means the agreed reference explains how registries and collectors connect metric classes to the server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100