Skip to content

azure-monitor-opentelemetry broken with the recent v1.32.0 release of opentelemetry-api and opentelemetry-sdk #40465

@mindspin

Description

@mindspin
  • 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:

  1. pip install azure-monitor-opentelemetry
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.Monitor - ExporterMonitor OpenTelemetry ExporterService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions