Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mindspin opened this issue Apr 10, 2025 · 6 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@mindspin
Copy link

mindspin commented Apr 10, 2025

  • 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.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. labels Apr 10, 2025
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @hectorhdzg @jeremydvoss @lzchen.

Copy link

Hello @mindspin. I'm an AI assistant for the azure-sdk-for-python repository. I found a solution for your issue!

• The recent opentelemetry-api/sdk v1.32.0 release has removed the get_dist_dependency_conflicts() function, which is currently used by azure-monitor-opentelemetry.

• As a workaround, please pin your opentelemetry-sdk version to 1.31.1 (or another compatible version) until we update our dependency requirements.

• We are aware of the issue and are planning a patch release to update our setup to constrain the opentelemetry dependencies appropriately. For more details on the breaking change, see opentelemetry-python-contrib PR#3202.

• For additional instructions on configuring Azure Monitor with OpenTelemetry, refer to the README.

This should solve your problem, if it does not feel free to reopen the issue.

@neeagl
Copy link

neeagl commented Apr 10, 2025

Our deployment just got failed as well because of this update. On digging, it appears in the package: opentelemetry-instrumentation
Have pinned it to v0.52b1 and it worked!

@jeremydvoss
Copy link
Member

Fixed in azure-monitor-opentelemetry==1.6.7

@jeremydvoss
Copy link
Member

Recommend closing, but we can leave open for a bit in case anyone has questions.

@Rexeh
Copy link

Rexeh commented Apr 11, 2025

Fixed in azure-monitor-opentelemetry==1.6.7

Thanks for such speedy response! Confirmed all good no more failed runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants