You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking to use asyncio debug mode to understand some issues with blocked event loops. The way that ddtrace patches asyncio leads to the name of each coroutine being masked.
Here's an example of the logs I get out without ddtrace:
Executing <Task finished name='Task-1' coro=<my_function() done, defined at /app/src/block.py:5> result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 2.002 seconds
And with ddtrace-run:
Executing <Task finished name='Task-1' coro=<_wrapped_create_task_py37.<locals>.traced_coro() done, defined at /usr/local/lib64/python3.12/site-packages/ddtrace/contrib/asyncio/patch.py:47> result=None created at /usr/local/lib64/python3.12/site-packages/ddtrace/contrib/asyncio/patch.py:53> took 2.008 seconds
Note the _wrapped_create_task_py37.<locals>.traced_coro() is really unhelpful here, and I'd much rather see the reference to the original function.
Here's the minimal example:
test.py:
async def my_function():
time.sleep(2)
if __name__ == "__main__":
asyncio.run(my_function())
Run with: PYTHONASYNCIODEBUG=1 ddtrace-run python3 test.py.
The text was updated successfully, but these errors were encountered:
I'm looking to use asyncio debug mode to understand some issues with blocked event loops. The way that ddtrace patches asyncio leads to the name of each coroutine being masked.
Here's an example of the logs I get out without ddtrace:
And with ddtrace-run:
Note the
_wrapped_create_task_py37.<locals>.traced_coro()
is really unhelpful here, and I'd much rather see the reference to the original function.Here's the minimal example:
test.py:
Run with:
PYTHONASYNCIODEBUG=1 ddtrace-run python3 test.py
.The text was updated successfully, but these errors were encountered: