Skip to content
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

Wrong installation path in exporter “convenience” packages #2020

Closed
musicinmybrain opened this issue Aug 6, 2021 · 2 comments · Fixed by #2525
Closed

Wrong installation path in exporter “convenience” packages #2020

musicinmybrain opened this issue Aug 6, 2021 · 2 comments · Fixed by #2525
Assignees
Labels
bug Something isn't working triaged

Comments

@musicinmybrain
Copy link
Contributor

musicinmybrain commented Aug 6, 2021

Describe your environment

This report should be reproducible on any platform.

Mine is Fedora Linux 34 with Python 3.9.6, setuptools 53.0.0, pip 21.0.1, and no other potentially-relevant pre-installed dependencies. (I can also reproduce on Fedora Rawhide with Python 3.10.0rc1, setuptools 57.4.0, pip 21.1.3.)

I am using version 1.4.1 of opentelemetry-python.

Steps to reproduce

$ python3 -m venv _e
$ . _e/bin/activate
(_e) $ pip install opentelemetry-exporter-zipkin
Collecting opentelemetry-exporter-zipkin
[…]
Successfully installed Deprecated-1.2.12 certifi-2021.5.30 charset-normalizer-2.0.4 idna-3.2 opentelemetry-api-1.4.1 opentelemetry-exporter-zipkin-1.4.1 opentelemetry-exporter-zipkin-json-1.4.1 opentelemetry-exporter-zipkin-proto-http-1.4.1 opentelemetry-instrumentation-0.23b2 opentelemetry-sdk-1.4.1 opentelemetry-semantic-conventions-0.23b2 protobuf-3.17.3 requests-2.26.0 six-1.16.0 urllib3-1.26.6 wrapt-1.12.1
WARNING: You are using pip version 21.0.1; however, version 21.2.3 is available.
[…]
(_e) $ find _e/lib/python3.9/site-packages/src/
_e/lib/python3.9/site-packages/src/
_e/lib/python3.9/site-packages/src/opentelemetry
_e/lib/python3.9/site-packages/src/opentelemetry/exporter
_e/lib/python3.9/site-packages/src/opentelemetry/exporter/zipkin
_e/lib/python3.9/site-packages/src/opentelemetry/exporter/zipkin/version.py
_e/lib/python3.9/site-packages/src/opentelemetry/exporter/zipkin/__pycache__
_e/lib/python3.9/site-packages/src/opentelemetry/exporter/zipkin/__pycache__/version.cpython-39.pyc

Repeat for opentelemetry-exporter-jaeger and opentelemetry-exporter-otlp.

What is the expected behavior?
All OpenTelemetry Python packages are installed under the opentelemetry namespace package (<SITE_PACKAGES>/opentelemetry).

What is the actual behavior?
The opentelemetry-exporter-jaeger, opentelemetry-exporter-otlp, and opentelemetry-exporter-zipkin “convenience” packages are installed under a src namespace mirroring the repository structure (<SITE_PACKAGES>/src/opentelemetry).

All others, including the exporter implementations (e.g. opentelemetry-exporter-jaeger-proto-grpc) are correctly installed under opentelemetry.

Additional context
It’s likely this has not been noticed since the actual implementations install in the correct path, and the convenience packages provide almost no functionality of their own. For example, opentelemetry-exporter-zipkin only offers the string opentelemetry.exporter.zipkin.version.__version__.

Compared to other packages in opentelemetry-python, these are missing:

[options]
package_dir=
    =src
 
[options.packages.find]
where = src

in setup.cfg. Adding those lines seems to resolve the problem.

@musicinmybrain musicinmybrain added the bug Something isn't working label Aug 6, 2021
@ocelotl ocelotl self-assigned this Aug 6, 2021
@github-actions
Copy link

github-actions bot commented Sep 6, 2021

This issue was marked stale due to lack of activity. It will be closed in 30 days.

@owais owais added the triaged label Sep 6, 2021
@github-actions github-actions bot removed the backlog label Sep 7, 2021
musicinmybrain added a commit to musicinmybrain/opentelemetry-python that referenced this issue Mar 13, 2022
These “convenience” packages were incorrectly installed in
“site-packages/src”, although the actual implementation packages they
depended on were installed in the correct paths (which is probably why
this was not noticed sooner).

Fixes open-telemetry#2020.
musicinmybrain added a commit to musicinmybrain/opentelemetry-python that referenced this issue Mar 13, 2022
These “convenience” packages were incorrectly installed in
“site-packages/src”, although the actual implementation packages they
depended on were installed in the correct paths (which is probably why
this was not noticed sooner).

Fixes open-telemetry#2020.
@musicinmybrain
Copy link
Contributor Author

I’ve been carrying a patch downstream in Fedora Linux implementing the fix I suggested above. I just submitted a PR—hopefully that will help get the change upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants