MagicStack / MagicStack/uvloop

Implement tracing support

Open
#163 12 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Cython
Stars
11.9k
Forks
616
PR merge metrics
No merged PRs in 30d

Description

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]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing this issue's requirements and the PEP 567 contextvars API; no implementation files, tests, or entry points are named. Done would mean reaching agreement on a hierarchical, low-overhead, detailed, flexible, and extensible asyncio tracing API before implementation begins.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.