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

Opentelemetry instrumentation uses deprecated pkg_resources. #1970

Open
jenshnielsen opened this issue Sep 26, 2023 · 0 comments · May be fixed by #1973
Open

Opentelemetry instrumentation uses deprecated pkg_resources. #1970

jenshnielsen opened this issue Sep 26, 2023 · 0 comments · May be fixed by #1973
Labels
bug Something isn't working

Comments

@jenshnielsen
Copy link

Describe your environment
Python 3.11
Setuptools >= 67.5.0
Windows 11

Steps to reproduce

Any operation that imports opentelemetry\instrumentation\dependencies.py

What is the expected behavior?

No deprecation warnings

What is the actual behavior?
What did you see instead?

C:\Users\jenielse\Miniconda3\envs\myenv\Lib\site-packages\opentelemetry\instrumentation\dependencies.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

Additional context

This was removed from opentelemetry sdk/api in open-telemetry/opentelemetry-python#3047

In addition to being deprecated pkg_resources is known to be problematic since it indexes all packages on start up adding significant overhead to the package import. Normally this should be replaced by importlib.resources or for older python version support importlib_resources

As a bonus this will also remove the runtime dependency on setuptools

@jenshnielsen jenshnielsen added the bug Something isn't working label Sep 26, 2023
abhinav283 pushed a commit to abhinav283/opentelemetry-python-contrib that referenced this issue Jan 14, 2024
abhinav283 pushed a commit to abhinav283/opentelemetry-python-contrib that referenced this issue Jan 14, 2024
abhinav283 pushed a commit to abhinav283/opentelemetry-python-contrib that referenced this issue Jan 15, 2024
Feature/add new process metrics (open-telemetry#1948)

Using new cloud resource id attribute (open-telemetry#1976)

Fixes open-telemetry#1970,remove pkg resources and use importlib_metadata
abhinav283 pushed a commit to abhinav283/opentelemetry-python-contrib that referenced this issue Jan 15, 2024
abhinav283 pushed a commit to abhinav283/opentelemetry-python-contrib that referenced this issue Jan 15, 2024
abhinav283 added a commit to abhinav283/opentelemetry-python-contrib that referenced this issue Jan 21, 2024
abhinav283 added a commit to abhinav283/opentelemetry-python-contrib that referenced this issue Jan 21, 2024
abhinav283 added a commit to abhinav283/opentelemetry-python-contrib that referenced this issue Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant