child_process: add tracing channel for spawn - #61836
Merged
nodejs-github-bot merged 2 commits intoFeb 25, 2026
Merged
Conversation
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
cjihrig
approved these changes
Feb 15, 2026
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61836 +/- ##
==========================================
- Coverage 89.72% 89.71% -0.02%
==========================================
Files 675 675
Lines 204797 204821 +24
Branches 39344 39355 +11
==========================================
Hits 183752 183752
- Misses 13324 13338 +14
- Partials 7721 7731 +10
🚀 New features to boost your workflow:
|
Collaborator
Collaborator
Collaborator
Collaborator
|
Landed in 764e9a7 |
This PR adds a new
child_process.spawntracing channel wrapping thespawncall. Sincespawnis synchronous, this usesstart,end, anderrorevents (rather than the async variants).Events
tracing:child_process.spawn:start— published before the native_handle.spawn()call, with{ process, options }tracing:child_process.spawn:end— published on successful spawn, with{ process }tracing:child_process.spawn:error— published on spawn failure, with{ process, error }Since
exec,execFile, andforkall callspawninternally, this single tracing channel covers all child process creation paths (e.g.: https://github.com/nodejs/node/blob/main/lib/child_process.js#L174)