Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Would it be nice to document `Registry`, `Collector` and metric classes?

未關閉
#803 1 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
文件
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
python
領域
documentation

研究方向

先檢視 README,以及包含全域 REGISTRY、Registry、Collector、指標類別和伺服器應用程式的原始碼區域。在撰寫之前,先釐清社群偏好的 API 參考範圍和格式。完成的標準是,已達成共識的參考文件能說明 registry 和 collector 如何將指標類別連接到伺服器應用程式。

由索引模型根據 Issue 內容生成。

描述

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:

  1. 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!

主要語言
Python
星號
4.4k
分支
876
平均合併
8 天 4 小時
30 天內合併 PR
1

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

prometheus/client_python 的其他 Issue

查看 prometheus/client_python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。