Describe the bug
elastic-opentelemetry 1.13.0 fails to load its distro at startup with ModuleNotFoundError: No module named 'opentelemetry._opamp.agent'. The contradiction is that 1.13.0 hard-pins opentelemetry-sdk==1.41.1 as a dependency, but imports a private internal module (opentelemetry._opamp.agent) that does not exist in opentelemetry-sdk 1.41.1. The distro fails entirely, leaving the application with no OTel instrumentation.
Downgrading to elastic-opentelemetry==1.11.0 resolves the issue.
To Reproduce
- Create a Python 3.12 virtual environment and install
elastic-opentelemetry==1.13.0 (e.g. via pip install elastic-opentelemetry==1.13.0)
- Confirm
opentelemetry-sdk==1.41.1 and opentelemetry-opamp-client==0.2b0 are installed as transitive dependencies
- Run any application with
opentelemetry-instrument python -m uvicorn myapp:app ... (or any WSGI/ASGI equivalent)
- Observe startup error:
Distribution distro configuration failed
Traceback (most recent call last):
File ".../opentelemetry/instrumentation/auto_instrumentation/_load.py", line 68, in _load_distro
distro = entry_point.load()()
File ".../elasticotel/distro/__init__.py", line 55, in <module>
from opentelemetry._opamp.agent import OpAMPAgent
ModuleNotFoundError: No module named 'opentelemetry._opamp.agent'
Failed to auto initialize OpenTelemetry
Environment (please complete the following information)
- OS: macOS (Darwin 25.5.0, Apple Silicon)
- Python version: 3.12.13
- Framework and version: FastAPI 0.115.x + uvicorn 0.30.x
- Distro version: elastic-opentelemetry 1.13.0
Additional context
The opentelemetry-opamp-client package (0.2b0) is installed — it is correctly listed as a dependency of elastic-opentelemetry 1.13.0 and resolves — but the failing import is opentelemetry._opamp.agent, which is a private internal module of opentelemetry-sdk (underscore-prefixed), not the public opentelemetry.opamp namespace provided by opentelemetry-opamp-client. These are two different things.
The package's own pinned SDK version (opentelemetry-sdk==1.41.1) does not contain opentelemetry._opamp, making this a self-contradictory release: the distro cannot load against the exact SDK version it requires.
Workaround: Pin to elastic-opentelemetry==1.11.0, which does not have this import and works correctly with the same application and Python version.
Description written by Claude and reviewed by Nikki.
Describe the bug
elastic-opentelemetry1.13.0 fails to load its distro at startup withModuleNotFoundError: No module named 'opentelemetry._opamp.agent'. The contradiction is that 1.13.0 hard-pinsopentelemetry-sdk==1.41.1as a dependency, but imports a private internal module (opentelemetry._opamp.agent) that does not exist inopentelemetry-sdk1.41.1. The distro fails entirely, leaving the application with no OTel instrumentation.Downgrading to
elastic-opentelemetry==1.11.0resolves the issue.To Reproduce
elastic-opentelemetry==1.13.0(e.g. viapip install elastic-opentelemetry==1.13.0)opentelemetry-sdk==1.41.1andopentelemetry-opamp-client==0.2b0are installed as transitive dependenciesopentelemetry-instrument python -m uvicorn myapp:app ...(or any WSGI/ASGI equivalent)Environment (please complete the following information)
Additional context
The
opentelemetry-opamp-clientpackage (0.2b0) is installed — it is correctly listed as a dependency ofelastic-opentelemetry1.13.0 and resolves — but the failing import isopentelemetry._opamp.agent, which is a private internal module ofopentelemetry-sdk(underscore-prefixed), not the publicopentelemetry.opampnamespace provided byopentelemetry-opamp-client. These are two different things.The package's own pinned SDK version (
opentelemetry-sdk==1.41.1) does not containopentelemetry._opamp, making this a self-contradictory release: the distro cannot load against the exact SDK version it requires.Workaround: Pin to
elastic-opentelemetry==1.11.0, which does not have this import and works correctly with the same application and Python version.Distro or OpenTelemetry config options
Click to expand
requirements.txt:Click to expand
Installed transitive versions confirmed via
pip show:opentelemetry-sdk: 1.41.1opentelemetry-api: 1.41.1opentelemetry-opamp-client: 0.2b0opentelemetry-semantic-conventions: 0.62b1Description written by Claude and reviewed by Nikki.