open-telemetry / open-telemetry/opentelemetry-python

installing xds-proto breaks opentelemetry-proto

Open
#4,843 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
2.6k
Forks
1k
Avg merge
4d 15h
Merged PRs (30d)
19

Description

Describe your environment

OS: (e.g, Ubuntu)
Python version: (e.g., Python 3.11.2)
SDK version: (e.g., 1.39.0)
API version: (e.g., 1.39.0)

What happened?

after installing xds-proto some opentelemetry-proto files becomes broken

Steps to Reproduce
$ uv pip uninstall xds-protos opentelemetry-proto
warning: Skipping opentelemetry-proto as it is not installed
warning: Skipping xds-protos as it is not installed
warning: No packages to uninstall

$ uv pip install opentelemetry-proto
 + opentelemetry-proto==1.39.0
 + protobuf==6.33.2

$ python -c "from opentelemetry.proto.common.v1.common_pb2 import InstrumentationScope"
// everything is fine

$ uv pip install xds-protos
 + grpcio==1.76.0
 + typing-extensions==4.15.0
 + xds-protos==1.76.0

$ python -c "from opentelemetry.proto.common.v1.common_pb2 import InstrumentationScope"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'InstrumentationScope' from 'opentelemetry.proto.common.v1.common_pb2'

reinstalling opentelemetry-proto after it fixes ImportError

Expected Result

no ImportError after installing xds-proto

Actual Result

ImportError

Additional context

No response

Would you like to implement a fix?

None

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the install sequence and the import failure for opentelemetry.proto.common.v1.common_pb2.InstrumentationScope. Compare the installed opentelemetry-proto and xds-protos package contents and metadata to identify the conflicting files. Done means the import continues to work after installing xds-protos without reinstalling opentelemetry-proto.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.