Description
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