Skip to content

Commit 3adc0cd

Browse files
committed
modify docs
1 parent d342d8c commit 3adc0cd

File tree

2 files changed

+16
-16
lines changed
  • instrumentation/opentelemetry-instrumentation-asyncio

2 files changed

+16
-16
lines changed

instrumentation/opentelemetry-instrumentation-asyncio/README.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ Set the name of the coroutine you want to trace.
1919
export OTEL_PYTHON_ASYNCIO_COROUTINE_NAMES_TO_TRACE=coro_name,coro_name2,coro_name3
2020
2121
If you want to keep track of which function to use in the to_thread function of asyncio, set the name of the function.
22-
----
22+
-----------------------------------------------
2323
.. code::
2424
export OTEL_PYTHON_ASYNCIO_TO_THREAD_FUNCTION_NAMES_TO_TRACE=func_name,func_name2,func_name3
2525
2626
For future, set it up like this
27-
----
27+
-----------------------------------------------
2828
.. code::
2929
export OTEL_PYTHON_ASYNCIO_FUTURE_TRACE_ENABLED=true
3030
31-
Run instrumented taskcoroutine
32-
----
31+
Run instrumented application
32+
--------------------
3333
1. coroutine
34-
----
34+
--------------------
3535
.. code:: python
3636
3737
# export OTEL_PYTHON_ASYNCIO_COROUTINE_NAMES_TO_TRACE=sleep
@@ -47,7 +47,7 @@ Run instrumented taskcoroutine
4747
asyncio.run(main())
4848
4949
2. future
50-
----
50+
--------------------
5151
.. code:: python
5252
5353
# export OTEL_PYTHON_ASYNCIO_FUTURE_TRACE_ENABLED=true
@@ -60,7 +60,7 @@ Run instrumented taskcoroutine
6060
loop.run_until_complete(task)
6161
6262
3. to_thread
63-
----
63+
--------------------
6464
.. code:: python
6565
6666
# export OTEL_PYTHON_ASYNCIO_TO_THREAD_FUNCTION_NAMES_TO_TRACE=func
@@ -80,7 +80,7 @@ Run instrumented taskcoroutine
8080
8181
8282
asyncio metric types
83-
-------
83+
--------------------
8484

8585
* `asyncio.futures.duration` (ms) - Duration of the future
8686
* `asyncio.futures.exceptions` (count) - Number of exceptions raised by the future

instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@
2424
export OTEL_PYTHON_ASYNCIO_COROUTINE_NAMES_TO_TRACE=coro_name,coro_name2,coro_name3
2525
2626
If you want to keep track of which function to use in the to_thread function of asyncio, set the name of the function.
27-
----
27+
-----------------------------------------------
2828
.. code::
2929
export OTEL_PYTHON_ASYNCIO_TO_THREAD_FUNCTION_NAMES_TO_TRACE=func_name,func_name2,func_name3
3030
3131
For future, set it up like this
32-
----
32+
-----------------------------------------------
3333
.. code::
3434
export OTEL_PYTHON_ASYNCIO_FUTURE_TRACE_ENABLED=true
3535
36-
Run instrumented taskcoroutine
37-
----
36+
Run instrumented application
37+
-----------------------------------------------
3838
1. coroutine
39-
----
39+
-----------------------------------------------
4040
.. code:: python
4141
4242
# export OTEL_PYTHON_ASYNCIO_COROUTINE_NAMES_TO_TRACE=sleep
@@ -52,7 +52,7 @@ async def main():
5252
asyncio.run(main())
5353
5454
2. future
55-
----
55+
-----------------------------------------------
5656
.. code:: python
5757
5858
# export OTEL_PYTHON_ASYNCIO_FUTURE_TRACE_ENABLED=true
@@ -65,7 +65,7 @@ async def main():
6565
loop.run_until_complete(task)
6666
6767
3. to_thread
68-
----
68+
-----------------------------------------------
6969
.. code:: python
7070
7171
# export OTEL_PYTHON_ASYNCIO_TO_THREAD_FUNCTION_NAMES_TO_TRACE=func
@@ -85,7 +85,7 @@ def func():
8585
8686
8787
asyncio metric types
88-
-------
88+
-----------------------------------------------
8989
9090
* `asyncio.futures.duration` (ms) - Duration of the future
9191
* `asyncio.futures.exceptions` (count) - Number of exceptions raised by the future

0 commit comments

Comments
 (0)