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
-
Base on the new contextvars (PEP 567) API, so that async tasks and callbacks they schedule are traced consistently.
-
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.
-
Low performance overhead. Ideally we should be able to run tracing in production.
-
Low-level and detailed: we want to be able to measure DNS requests, read/write callbacks performance, throughput, number of callbacks/tasks created etc.
-
Flexibility: traces should be in easy to work with format, so that it's possible to submit them to existing systems like zipkin.
-
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.
-
[TBD]
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
Base on the new
contextvars(PEP 567) API, so that async tasks and callbacks they schedule are traced consistently.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.
Low performance overhead. Ideally we should be able to run tracing in production.
Low-level and detailed: we want to be able to measure DNS requests, read/write callbacks performance, throughput, number of callbacks/tasks created etc.
Flexibility: traces should be in easy to work with format, so that it's possible to submit them to existing systems like zipkin.
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.
[TBD]