-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Based on #903, there is no specific python trace context correlation heuristic. The thread based correlation should work well for traditional WSGI frameworks like Flask and Django but not for asyncio.
Rather than focus on asyncio, I'm wondering if correlation can be done by the builtin contextvars api which provides generic context local storage and is well integrated with asyncio and can be plugged into other concurrency frameworks with context.run(). There is a C API for entering/exiting a context https://docs.python.org/3/c-api/contextvars.html#c.PyContext_Enter.
Let me know if you need more details or it's infeasible. We also use contextvars for the OTel Python context which might make integration with a live SDK feasible.
marctc and dashpoleNimrodAvni78 and dashpole
Metadata
Metadata
Assignees
Labels
No labels