getsentry / getsentry/sentry-python

Investigate profiling with sys.monitoring/PEP 669

オープン
#2,683 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る
Feature Profiles Python
主要言語
Python
スター
2.2k
フォーク
669
平均マージ
1日 1時間
マージ済み PR(30日)
213

説明

### 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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。