You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting with ddtrace-run and ddtrace 2.4.3 or 2.7.6 when opentelemetry-api 1.24.0 is present results in the following error message:
error configuring Datadog tracing
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/ddtrace/bootstrap/sitecustomize.py", line 116, in <module>
import ddtrace.bootstrap.preload as preload # Perform the actual initialisation
File "/usr/local/lib/python3.10/site-packages/ddtrace/internal/module.py", line 220, in _exec_module
self.loader.exec_module(module)
File "/usr/local/lib/python3.10/site-packages/ddtrace/bootstrap/preload.py", line 14, in <module>
from ddtrace.internal.tracemethods import _install_trace_methods # noqa:F401
File "/usr/local/lib/python3.10/site-packages/ddtrace/internal/module.py", line 220, in _exec_module
self.loader.exec_module(module)
File "/usr/local/lib/python3.10/site-packages/ddtrace/internal/tracemethods.py", line 4, in <module>
import wrapt
ModuleNotFoundError: No module named 'wrapt'
This can be traced back to the following change in the dependency tree for ddtrace
By adding a dependency on wrapt >=1.10,<2 to my project, I was able to utilize DD tracing again.
Further digging shows that the reason that wrapt is missing is not due to opentelemetry-api 1.24.0 not depending on wrapt anymore, but rather due to a bug in Poetry 1.3.2 that was fixed at some point prior to their latest release, 1.8.2. That being said, relying on your dependencies to install your direct dependencies for you is just asking to become broken by an "improvement" to one of your direct or transitive dependencies that drops a dependency that you're using directly. You should audit your code to ensure that any other libraries in addition to wrapt are actually included in the install dependencies for this package.
I was unable to build a minimal reproduction case for this issue as it is caused by a combination of our very large pyproject.toml file and an old version of Poetry that is not maintained anymore. You can "reproduce" the initial error that I had by doing pip install ddtrace==2.7.6 && poetry uninstall wrapt, though I doubt that is actually helpful in addressing the problem here :)
What is the result that you get?
What is the result that you expected?
The text was updated successfully, but these errors were encountered:
Summary of problem
When starting with
ddtrace-run
andddtrace
2.4.3 or 2.7.6 whenopentelemetry-api
1.24.0 is present results in the following error message:This can be traced back to the following change in the dependency tree for
ddtrace
By adding a dependency on
wrapt >=1.10,<2
to my project, I was able to utilize DD tracing again.Further digging shows that the reason that
wrapt
is missing is not due toopentelemetry-api
1.24.0 not depending onwrapt
anymore, but rather due to a bug in Poetry 1.3.2 that was fixed at some point prior to their latest release, 1.8.2. That being said, relying on your dependencies to install your direct dependencies for you is just asking to become broken by an "improvement" to one of your direct or transitive dependencies that drops a dependency that you're using directly. You should audit your code to ensure that any other libraries in addition towrapt
are actually included in the install dependencies for this package.Which version of dd-trace-py are you using?
Reproduced on both 2.4.3 and 2.7.6
Which version of pip are you using?
Poetry 1.3.2
Which libraries and their versions are you using?
`pip freeze`
ddtrace 2.4.3 Datadog APM client library ├── attrs 23.2.0 ├── bytecode 0.15.1 ├── cattrs 23.2.3 │ ├── attrs 23.2.0 │ ├── exceptiongroup 1.2.0 │ └── typing-extensions 4.6.1 ├── ddsketch 3.0.1 │ ├── protobuf 3.20.3 │ └── six 1.16.0 ├── envier 0.5.1 ├── opentelemetry-api 1.24.0 ├── protobuf 3.20.3 ├── six 1.16.0 ├── typing-extensions 4.6.1 └── xmltodict 0.13.0How can we reproduce your problem?
I was unable to build a minimal reproduction case for this issue as it is caused by a combination of our very large
pyproject.toml
file and an old version of Poetry that is not maintained anymore. You can "reproduce" the initial error that I had by doingpip install ddtrace==2.7.6 && poetry uninstall wrapt
, though I doubt that is actually helpful in addressing the problem here :)What is the result that you get?
What is the result that you expected?
The text was updated successfully, but these errors were encountered: