-
Notifications
You must be signed in to change notification settings - Fork 417
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
chore(integrations): remove required_modules from integrations #11719
base: main
Are you sure you want to change the base?
Conversation
|
2634736
to
2a29668
Compare
BenchmarksBenchmark execution time: 2024-12-19 23:53:43 Comparing candidate commit 8b0def1 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 394 metrics, 2 unstable metrics. |
2a29668
to
7e13140
Compare
Datadog ReportBranch report: ✅ 0 Failed, 55 Passed, 1413 Skipped, 1m 17.72s Total duration (32m 37.73s time saved) |
Since ddtrace v1.9.0 modules are only patched after import. There is no need to check whether a module exists in
ddtrace.contrib.integration_name.__init__
. If a library is not installed, it won't be patched.require_modules
should only be used when a ddtrace integration requires additional libraries (for example the web3 integration can only be enabled if web3_driver is also installed). Right now there is no integrations that have such a dependency.With this change objects exposed in
ddtrace.contrib.<integration_name>.__all__
will always be available. Accessing these objects will not raise an AttributeError and crash an application: ex.Checklist
Reviewer Checklist