prometheus / prometheus/client_python
Would it be nice to document `Registry`, `Collector` and metric classes?
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 4.4k
- 派生
- 876
- 平均合并
- 8 天 4 小时
- 30 天内合并 PR
- 1
描述
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!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先查看 README 以及包含全局 REGISTRY、Registry、Collector、指标类和服务器应用的源代码区域。在编写之前,明确社区偏好的 API 参考范围和格式。完成的标准是,达成一致的参考文档能够说明 registry 和 collector 如何将指标类连接到服务器应用。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100