Skip to content

Commit

Permalink
modify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bourbonkk committed Oct 10, 2023
1 parent a56cd65 commit 3356942
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
Set the name of the coroutine you want to trace.
-----------------------------------------------
-------------------------------------------------
.. code::
export OTEL_PYTHON_ASYNCIO_COROUTINE_NAMES_TO_TRACE=coro_name,coro_name2,coro_name3
If you want to keep track of which function to use in the to_thread function of asyncio, set the name of the function.
-----------------------------------------------
------------------------------------------------------------------------------------------------------------------------
.. code::
export OTEL_PYTHON_ASYNCIO_TO_THREAD_FUNCTION_NAMES_TO_TRACE=func_name,func_name2,func_name3
For future, set it up like this
-----------------------------------------------
---------------------------------
.. code::
export OTEL_PYTHON_ASYNCIO_FUTURE_TRACE_ENABLED=true
Run instrumented application
-----------------------------------------------
------------------------------
1. coroutine
-----------------------------------------------
----------------
.. code:: python
# export OTEL_PYTHON_ASYNCIO_COROUTINE_NAMES_TO_TRACE=sleep
Expand All @@ -52,7 +52,7 @@ async def main():
asyncio.run(main())
2. future
-----------------------------------------------
------------
.. code:: python
# export OTEL_PYTHON_ASYNCIO_FUTURE_TRACE_ENABLED=true
Expand All @@ -65,7 +65,7 @@ async def main():
loop.run_until_complete(task)
3. to_thread
-----------------------------------------------
-------------
.. code:: python
# export OTEL_PYTHON_ASYNCIO_TO_THREAD_FUNCTION_NAMES_TO_TRACE=func
Expand All @@ -85,7 +85,7 @@ def func():
asyncio metric types
-----------------------------------------------
---------------------
* `asyncio.futures.duration` (ms) - Duration of the future
* `asyncio.futures.exceptions` (count) - Number of exceptions raised by the future
Expand Down

0 comments on commit 3356942

Please sign in to comment.