MagicStack / MagicStack/uvloop

Implement tracing support

未关闭
#163 12 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

enhancement
主要语言
Cython
星标
11.9k
派生
616
PR 合并指标
30 天内没有已合并 PR

描述

This is a meta issue to discuss how new asyncio tracing API should look like. We will implement it first in uvloop, and later, if necessary, port it to asyncio.


Requirements
  1. Base on the new contextvars (PEP 567) API, so that async tasks and callbacks they schedule are traced consistently.

  2. Traces should be hierarchical, i.e. it should be possible to see what and how exactly one Task did, what Tasks that it spawned did, etc.

  3. Low performance overhead. Ideally we should be able to run tracing in production.

  4. Low-level and detailed: we want to be able to measure DNS requests, read/write callbacks performance, throughput, number of callbacks/tasks created etc.

  5. Flexibility: traces should be in easy to work with format, so that it's possible to submit them to existing systems like zipkin.

  6. Extensibility: the new API should be easy to maintain on both ends: in the event loop and in applications that use it. This means that adding a new kind of trace should not require people to write any glue code.

  7. [TBD]

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先审查此 issue 的需求以及 PEP 567 contextvars API;其中未指定任何实现文件、测试或入口点。在开始实现之前,就一个分层、低开销、详细、灵活且可扩展的 asyncio tracing API 达成一致,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
backend, networking
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。