Skip to content

Commit

Permalink
modify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bourbonkk committed Oct 9, 2023
1 parent d342d8c commit 3adc0cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions instrumentation/opentelemetry-instrumentation-asyncio/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ Set the name of the coroutine you want to trace.
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 taskcoroutine
----
Run instrumented application
--------------------
1. coroutine
----
--------------------
.. code:: python
# export OTEL_PYTHON_ASYNCIO_COROUTINE_NAMES_TO_TRACE=sleep
Expand All @@ -47,7 +47,7 @@ Run instrumented taskcoroutine
asyncio.run(main())
2. future
----
--------------------
.. code:: python
# export OTEL_PYTHON_ASYNCIO_FUTURE_TRACE_ENABLED=true
Expand All @@ -60,7 +60,7 @@ Run instrumented taskcoroutine
loop.run_until_complete(task)
3. to_thread
----
--------------------
.. code:: python
# export OTEL_PYTHON_ASYNCIO_TO_THREAD_FUNCTION_NAMES_TO_TRACE=func
Expand All @@ -80,7 +80,7 @@ Run instrumented taskcoroutine
asyncio metric types
-------
--------------------

* `asyncio.futures.duration` (ms) - Duration of the future
* `asyncio.futures.exceptions` (count) - Number of exceptions raised by the future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@
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 taskcoroutine
----
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 3adc0cd

Please sign in to comment.