prometheus / prometheus/client_python

Does GCCollector work in multiprocess mode?

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

還沒有人認領這個 Issue。

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

描述

Hi all,

First of all sorry if the question is kinda stupid, I would not ask if the answer was evident somewhere to me, but I'm interested to find out does GC reporting works in multiprocess (gunicorn) mode of work. As when I have used this client in multiprocess mode with gunicorn I did not get any metrics about GC at all out of the box, I needed to write my own metric.

I took a look through old issues at this project and managed to find some related to this problem:

And I saw that implementation of GCCollector uses get_stats() from Python module, there is no custom callback in this code (lock is still there to manage files) so I'm somewhat confused does this work or not, because, it seems to me that this gc.get_stats can be used as any other metric where you would report GC metrics per PID (this is little too much of data but still) and just for example set gauge to some value when reporting.

AM I missing something here or?

Thank you :)

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

首先檢查 GCCollector 的實作,以及 Python 的 gc.get_stats() 在 gunicorn multiprocess 模式下的行為。將調查結果與相關 issue #322 進行比較,並判斷是否預期 GC metrics 能夠正常運作;記錄受支援的行為,或找出所需的具體變更。

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

評估

技術堆疊
python
領域
observability-sre
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

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

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