Auto-isolate asyncio tasks if event loop is running
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
先閱讀現有的 AsyncioIntegration 及其隔離作用域行為,然後比較提議的自動啟用設計。檢查如何對正在執行的事件迴圈進行修補、是否可以重複修補,以及這會如何影響現有的 AsyncioIntegration 使用者。完成的標準是任務隔離能夠自動運作,同時附加功能仍需明確 opt-in,並且在沒有事件迴圈的情況下能夠優雅地失敗。
由索引模型根據 Issue 內容生成。
描述
Currently, the opt-in AsyncioIntegration is responsible for multiple things, one of them being providing proper scope isolation in asyncio tasks. Without this functionality, people are running into different types of hard-to-diagnose scope bleed issues, like here.
Goal
- Automatically patch the current event loop to isolate tasks in their isolation scopes, if there is an event loop running
- For additional functionality (creating task spans, etc.), explicit opt-in should still be required from users
How to do this
Different ways to do this, each with its own caveats (e.g. introducing breaking changes).
- Take the isolation scope logic out of
AsyncioIntegrationinto its own integration and make it auto-enabled (best effort, if there is no event loop we can't do anything). - Make
AsyncioIntegrationauto-enabled, and change the additional functions it's providing (like task spans) to be opt-in. Also, make it fail gracefully if there is no event loop to patch. - ???
When picking an option, consider:
- Will this break behavior for existing users using the
AsyncioIntegration? - Is there a risk of double-patching the event loop?
- 主要語言
- Python
- 星號
- 2.2k
- 分支
- 682
- 平均合併
- 1 天 7 小時
- 30 天內合併 PR
- 246
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getsentry/sentry-python 的其他 Issue
-
Improvement Python Spans
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-python#7876 · 2 則留言 ·
維護者通常 1 天內回覆
-
Bug Python
難度 2/5 1-3 小時 新手友好度 76/100
getsentry/sentry-python#7870 · 2 則留言 ·
維護者通常 1 天內回覆
-
Python
難度 2/5 1-3 小時 新手友好度 68/100
getsentry/sentry-python#6992 · 1 則留言 ·
維護者通常 1 天內回覆
-
Improvement Python
難度 2/5 1-3 小時 新手友好度 65/100
getsentry/sentry-python#6970 · 1 則留言 ·
維護者通常 1 天內回覆
-
match_regex_list raises IndexError when a pattern list contains an empty string可能已有人在做 @wahajahmed010 於 105 天前認領。 未關閉Bug Python
難度 2/5 1-3 小時 新手友好度 74/100
getsentry/sentry-python#6504 · 1 則留言 ·
維護者通常 1 天內回覆
查看 getsentry/sentry-python 的全部 Issue
相似的 Issue
-
area:space-accuracy good first issue track:data
難度 2/5 1-3 小時 新手友好度 85/100
Sara-Managed-Projects/space-radar#904 ·
維護者通常 1 天內回覆