-
Notifications
You must be signed in to change notification settings - Fork 429
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: add integration registry #13051
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 234 ± 3 ms. The average import time from base is: 234 ± 3 ms. The import time difference between this PR and base is: -0.5 ± 0.1 ms. Import time breakdownThe following import paths have grown:
|
BenchmarksBenchmark execution time: 2025-04-07 16:49:57 Comparing candidate commit 05e6e3c in PR branch Found 4 performance improvements and 0 performance regressions! Performance is the same for 462 metrics, 2 unstable metrics. scenario:flasksqli-appsec-enabled
scenario:flasksqli-iast-enabled
scenario:flasksqli-tracer-enabled
scenario:iast_aspects-replace_aspect
|
Description
This PR adds a registry for integrations, that for a start contains the name of the integration and the package dependency name. Within the registry, other information is also stored on a per integration basis.
This information includes:
cherrypy
do not havepatch()
methodsTests added with this PR include
test_registry_conforms_to_schema
: Validates the overall structure and data types ofregistry.yaml
against the_registry_schema.json
definition using jsonschema.test_all_internal_dirs_accounted_for
: Ensures every subdirectory withinddtrace/contrib/internal
has a corresponding integration_name entry inregistry.yaml
, and vice-versa.test_registry_integrations_in_patch_modules
: Verifies that every integration markedis_patchable: true
inregistry.yaml
also exists as a key in thePATCH_MODULES
dictionary inddtrace._monkey.py
.dependency_name
field is only present for integrations markedis_external_package: true
and that such external integrations have either adependency_name
orinstrumented_modules
.test_version_fields_only_if_external
: Ensures thetested_version_*
fields only exist for integrations markedis_external_package: true
and validates that the version strings follow SemVer format.test_patched_by_default_only_if_patchable
: Confirms thepatched_by_default
field generally only exists ifis_patchable: true
(allowing for the "MISSING..." status).test_instrumented_modules_only_if_patchable
: Checks that theinstrumented_modules
field generally only exists ifis_patchable: true
.test_external_packages_have_version_fields
: Ensures all non-deprecated, external integrations have thetested_version_min
,tested_version_max
, andtested_versions_list
fields defined.test_remapped_modules_in_contrib_map
: Verifies that if an integration'sinstrumented_modules
list doesn't include theintegration_name
itself, thatintegration_name
must be present as a key in the_MODULES_FOR_CONTRIB
mapping inddtrace._monkey.py
.Checklist
Reviewer Checklist