fix(crastracking): strip bootstrap dir for ct receiver - #20084
Conversation
Codeowners resolved asResolved from the full PR diff against No remaining files require a CODEOWNERS review. |
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 62ca6ac | Docs | View more details | Give us feedback! |
Circular import analysis
|
Dependency direction analysis
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f554c4281
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
c380eaf to
dd4a177
Compare
BenchmarksBenchmark execution time: 2026-09-08 17:30:22 Comparing candidate commit 62ca6ac in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 568 metrics, 10 unstable metrics, 6 known flaky benchmarks, 18 flaky benchmarks without significant changes.
|
2e9ac21 to
4ddc4d6
Compare
brettlangdon
left a comment
There was a problem hiding this comment.
small nit, otherwise lgtm
question: worth injecting an env var when the receiver is running, and we can have our bootstrap exit early or something when in that case?
taegyunkim
left a comment
There was a problem hiding this comment.
This overlaps with my earlier PR, #19735.
My main request is to bring over the subprocess regression so we verify both native-module importability and the absence of receiver self-instrumentation, rather than only checking the generated PYTHONPATH
13969bb to
de219b4
Compare
7bd7d05 to
62ca6ac
Compare
56dcf88
into
main

PROF-15922
Description
The crashtracker receiver subprocess inherits
PYTHONPATHfrom the parent process. When the parent was launched withddtrace-run, that PYTHONPATH includes the bootstrap dir containingsitecustomize.py, so the receiver's own interpreter re-runs the full ddtrace bootstrap, starting a second, independently-configured copy of ddtrace using the receiver's stripped-down env (no DD_ENV/DD_SERVICE). This was noticed here in this schema check failure for system testsWe can strip the
ddtrace-runbootstrap directory out of the inheritedPYTHONPATHbefore spawning the receiver, so it stays an uninstrumented script while still able to locate the ddtrace package using any other PYTHONPATH entries.Testing
Risks
Additional Notes