diff --git a/.changelog/4912.fixed b/.changelog/4912.fixed new file mode 100644 index 0000000000..e326be2d6a --- /dev/null +++ b/.changelog/4912.fixed @@ -0,0 +1 @@ +`opentelemetry-instrumentation-logging`: fix documented name of the code attributes env var to `OTEL_PYTHON_LOG_CODE_ATTRIBUTES` diff --git a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py index f787184cad..58b338b8c3 100644 --- a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py +++ b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py @@ -56,7 +56,7 @@ The default value is ``true``. -.. envvar:: OTEL_PYTHON_CODE_ATTRIBUTES +.. envvar:: OTEL_PYTHON_LOG_CODE_ATTRIBUTES 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.