-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
- Package Name: azure-monitor-opentelemetry
- Package Version: 1.6.6
- Operating System: Windows
- Python Version: 3.10
Describe the bug
The new 1.32.0 version of opentelemetry-api and opentelemetry-sdk brings a breaking change that removes the get_dist_dependency_conflicts()
function used by azure-monitor-opentelemetry.
To Reproduce
Steps to reproduce the behavior:
pip install azure-monitor-opentelemetry
from azure.monitor.opentelemetry import configure_azure_monitor
Expected behavior
The import of 'configure_azure_monitor' shouldn't fail.
Screenshots
pip install azure-monitor-opentelemetry
>> from azure.monitor.opentelemetry import configure_azure_monitor
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../lib/site-packages/azure/monitor/opentelemetry/__init__.py", line 7, in <module>
from azure.monitor.opentelemetry._configure import configure_azure_monitor
File ".../lib/site-packages/azure/monitor/opentelemetry/_configure.py", line 12, in <module>
from opentelemetry.instrumentation.dependencies import (
ImportError: cannot import name 'get_dist_dependency_conflicts' from 'opentelemetry.instrumentation.dependencies' (.../lib/site-packages/opentelemetry/instrumentation/dependencies.py)
Workaround
Explicitly installing opentelemetry-sdk at a previous version, ie 1.31.1, fixes the issue.
Additional context
The setup.py file specifies dependency versions for opentelemetry-api and opentelemetry-sdk as ~=1.26. This allows any version within the range >=1.26.0 and <2.0.0 to be installed, as the ~= specifier ensures compatibility within the same major version. As a result, pip installs version 1.32.0, which falls within this range.