Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/5353.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`opentelemetry-sdk`: document that Python-implementation extensions (`OTEL_PYTHON_*` variables) are bypassed when `OTEL_CONFIG_FILE` is set. The env-var initialisation path is skipped entirely in favour of the declarative file; honouring these alongside a config file is tracked as a follow-up.
7 changes: 7 additions & 0 deletions docs/sdk/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ Behavior notes
not consulted. Environment variables can still be read indirectly by
components the file enables (for example resource detectors) and via
``${env:VAR}`` substitution.
* Python-implementation extensions (``OTEL_PYTHON_*`` variables such as
``OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED`` or
``OTEL_PYTHON_TRACER_CONFIGURATOR``) are **not** applied when
``OTEL_CONFIG_FILE`` is set: the env-var initialisation path is skipped
entirely. If your app currently relies on one of these and you are
migrating to a config file, plan to capture the equivalent behaviour in
the file (or in code) instead.
* Sections omitted from the file leave the corresponding global provider
unset (a no-op provider), per the specification.
* Setting ``disabled: true`` at the top level turns the SDK into a no-op.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,16 @@
sole source for SDK construction. Spec-defined ``OTEL_*`` variables with
schema equivalents are ignored. Env vars may still be read indirectly by
components the file enables (e.g. resource detectors) and via
``${env:VAR}`` substitution inside the file. See the OpenTelemetry
declarative configuration specification for details.
``${env:VAR}`` substitution inside the file.

Python-implementation extensions outside the spec (``OTEL_PYTHON_*``
variables such as ``OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED`` or
:envvar:`OTEL_PYTHON_TRACER_CONFIGURATOR`) are also bypassed when
:envvar:`OTEL_CONFIG_FILE` is set, because the env-var initialisation path
is skipped entirely in favour of the declarative file. Honouring these
alongside a config file is tracked separately.

See the OpenTelemetry declarative configuration specification for details.
"""

OTEL_RESOURCE_ATTRIBUTES = "OTEL_RESOURCE_ATTRIBUTES"
Expand Down
Loading