getsentry / getsentry/sentry-python
Investigate profiling with sys.monitoring/PEP 669
- 主要語言
- Python
- 星號
- 2.2k
- 分支
- 669
- 平均合併
- 1 天 40 分鐘
- 30 天內合併 PR
- 212
描述
### Problem Statement
Sentry's built-in profiling is reasonably low-overhead, but it takes a snapshot of the app's stack every ~10ms. This can miss quite a lot of events. Before Python 3.12, implementing a more comprehensive profiler would tank performance and was absolutely cost-prohibitive in production.
### Solution Brainstorm
But since 3.12 we have [PEP 669](https://peps.python.org/pep-0669/) and [sys.monitoring](https://docs.python.org/3/library/sys.monitoring.html), a low(er)-overhead method of getting access to interpreter events. These allow informing a profiler whenever a new interpreter event happens in process. It'd be nice to investigate if this could be used for more granular Python profiling.
貢獻指南
研究方向
未指定檔案、測試或進入點。先閱讀 PEP 669 和 Python sys.monitoring 文件,接著找出 Sentry 現有的內建 profiling 實作,並將其 snapshot 行為與直譯器事件監控進行比較。完成的標準是確認更細粒度的 profiler 是否能以可接受的 production overhead 實現,並記錄調查結果。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- observability-sre, performance
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 30/100