-
Notifications
You must be signed in to change notification settings - Fork 440
chore(lib-injection): change ssi code to use safe instrumentation configuration #13617
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tegration-guardrail-functions
emmettbutler
approved these changes
Jun 12, 2025
...enotes/notes/update-lib-injection-to-use-safe-instrumentation-patching-e2035b51fafb793b.yaml
Show resolved
Hide resolved
wantsui
reviewed
Jun 12, 2025
wantsui
reviewed
Jun 12, 2025
…ation-patching-e2035b51fafb793b.yaml Co-authored-by: Emmett Butler <723615+emmettbutler@users.noreply.github.com>
wantsui
reviewed
Jun 13, 2025
...enotes/notes/update-lib-injection-to-use-safe-instrumentation-patching-e2035b51fafb793b.yaml
Outdated
Show resolved
Hide resolved
…ation-patching-e2035b51fafb793b.yaml Co-authored-by: wantsui <wan.tsui@datadoghq.com>
wantsui
reviewed
Jun 13, 2025
wantsui
approved these changes
Jun 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Updates SSI lib injection to only compare installed package versions against ddtrace dependencies. Removes any checks against unrelated libraries / integration libraries. Adds environment variable
DD_TRACE_SAFE_INSTRUMENTATION_ENABLED=true
which ensures we only patch compatible instrumentation packages.Removes
min_compatible_version.csv
as well since it is no longer needed.Changes:
lib-injection/sources/sitecustomize.py
.min_compatible_versions.csv
files were removed, since the SSIsitecustomize
code no longer compares this table against the packages / versions installed on the injected application.requirements.csv
was added, which only includes the base ddtrace dependencies, and is compared against the application's installed packages, to ensure no conflicts. Any conflicts here result in library injection being aborted.requirements.csv
, and a workflow to check if the file would have changed, running on each PR and will require users to update the csv file if changes were detected.dd-trace-py's
compatible versions for the relevant integration.Checklist
Reviewer Checklist