|
17 | 17 |
|
18 | 18 | _MODULE_DOC = """ |
19 | 19 | The OpenTelemetry ``logging`` instrumentation automatically instruments Python logging |
20 | | -system with an handler to convert log messages into OpenTelemetry logs. |
21 | | -You can disable this setting ``OTEL_PYTHON_LOG_AUTO_INSTRUMENTATION`` to ``false``. |
| 20 | +with a handler to convert Python log messages into OpenTelemetry logs and export them. |
| 21 | +You can disable this by setting ``OTEL_PYTHON_LOG_AUTO_INSTRUMENTATION`` to ``false``. |
22 | 22 |
|
23 | 23 | .. warning:: |
24 | 24 |
|
25 | | - The code in this instrumentation is based from code available in the ``opentelemetry-sdk`` that is now deprecated. |
26 | | - Therefore if you have opentelemetry-instrumentation-logging installed you don't need to set |
| 25 | + This package provides a logging handler to replace the deprecated one in ``opentelemetry-sdk``. |
| 26 | + Therefore if you have ``opentelemetry-instrumentation-logging`` installed, you don't need to set the |
27 | 27 | ``OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED`` environment variable to ``true``. |
28 | | - This instrumentation does not add by the default ``code`` namespace attributes, can be added back using the |
29 | | - ``OTEL_PYTHON_CODE_ATTRIBUTES`` environment variable. |
| 28 | + By default, this instrumentation does not add ``code`` namespace attributes as the SDK's logger does, but adding them can be enabled by using the |
| 29 | + ``OTEL_PYTHON_LOG_CODE_ATTRIBUTES`` environment variable. |
30 | 30 |
|
31 | 31 | Enable trace context injection |
32 | 32 | ------------------------------ |
|
59 | 59 |
|
60 | 60 | .. envvar:: OTEL_PYTHON_LOG_AUTO_INSTRUMENTATION |
61 | 61 |
|
62 | | -This env var must be set to ``false`` in order to disable automatic instrumentation of the Python logging module with a handler |
63 | | -that will convert log message into OpenTelemetry logs. |
| 62 | +Set this env var to ``false`` to skip installing the logging handler provided by this package. |
64 | 63 |
|
65 | 64 | The default value is ``true``. |
66 | 65 |
|
67 | 66 | .. envvar:: OTEL_PYTHON_CODE_ATTRIBUTES |
68 | 67 |
|
69 | | -This env var can be used to fill ``code`` attributes into OpenTelemetry logs referencing the Python code that is emitting log messages. |
| 68 | +Set this env var to ``true`` to add ``code`` attributes (``code.file.path``, ``code.function.name``, ``code.line.number``) to OpenTelemetry logs, referencing the Python source location that emitted each log message. |
70 | 69 |
|
71 | 70 | The default value is ``false``. |
72 | 71 |
|
|
0 commit comments