add pid to log lines from parent process - #7290
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
andrewnitu
marked this pull request as ready for review
September 15, 2026 18:14
Member
|
This isn't going to work for any native libraries, since they don't use the Python logger. We have the same issue on the job processes |
Contributor
Author
|
@theomonnom agreed, I noted that in the description. But it's better than what was before :-) we have to come up with another solution if we want to capture those. |
theomonnom
approved these changes
Sep 15, 2026
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
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.
What
This PR adds 'pid' to log lines from the parent worker process (logs such as
registered worker,HTTP server listening,preloading plugins) where the pid is not already present.Lines from the child processes already carry pid so no need to add it here.
NOTE: This doesn't cover all possible lines, e.g. lines printed via print() without using the logger, lines from imported libraries, etc. Might be ways around this but not sure at the moment.
JS parity
JS SDK already emits pid from both parent processes and child processes.
Testing
Verified on a hosted agent in staging: parent lines
pid: 1, job child50, prewarmed child122, no JSON line without a pid.