Skip to content

Commit 857e5c2

Browse files
committed
Fixing rst syntax for logging instrumentation examples
1 parent c6c59e3 commit 857e5c2

File tree

1 file changed

+4
-5
lines changed
  • instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
2222
.. code-block:: python
2323
24-
# export OTEL_PYTHON_LOG_CORRELATION=true
25-
2624
import logging
2725
2826
from opentelemetry.instrumentation.logging import LoggingInstrumentor
@@ -32,9 +30,10 @@
3230
logging.warning('OTel test')
3331
3432
When running the above example you will see the following output:
35-
```
36-
2025-03-05 09:40:04,398 WARNING [root] [example.py:7] [trace_id=0 span_id=0 resource.service.name= trace_sampled=False] - OTel test
37-
```
33+
34+
::
35+
36+
2025-03-05 09:40:04,398 WARNING [root] [example.py:7] [trace_id=0 span_id=0 resource.service.name= trace_sampled=False] - OTel test
3837
3938
The environment variable `OTEL_PYTHON_LOG_CORRELATION` must be set to `true`
4039
in order to enable trace context injection into logs by calling

0 commit comments

Comments
 (0)