Skip to content

child_process: add tracing channel for spawn#61836

Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom
marcopiraccini:child-process-diagnostic-channel
Feb 25, 2026
Merged

child_process: add tracing channel for spawn#61836
nodejs-github-bot merged 2 commits intonodejs:mainfrom
marcopiraccini:child-process-diagnostic-channel

Conversation

@marcopiraccini
Copy link
Contributor

This PR adds a new child_process.spawn tracing channel wrapping the spawn call. Since spawn is synchronous, this uses start, end, and error events (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, and fork all call spawn internally, this single tracing channel covers all child process creation paths (e.g.: https://github.com/nodejs/node/blob/main/lib/child_process.js#L174)

Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. needs-ci PRs that need a full CI run. labels Feb 15, 2026
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Copy link
Contributor

@ShogunPanda ShogunPanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ShogunPanda ShogunPanda added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 16, 2026
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.71%. Comparing base (9cc7fcc) to head (082952e).
⚠️ Report is 54 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/child_process.js 75.00% 6 Missing ⚠️
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     
Files with missing lines Coverage Δ
lib/internal/child_process.js 94.65% <75.00%> (-0.70%) ⬇️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 18, 2026
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@ShogunPanda ShogunPanda added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Feb 25, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 25, 2026
@nodejs-github-bot nodejs-github-bot merged commit 764e9a7 into nodejs:main Feb 25, 2026
70 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 764e9a7

@richardlau richardlau added semver-minor PRs that contain new features and should be released in the next minor version. and removed semver-minor PRs that contain new features and should be released in the next minor version. labels Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

child_process Issues and PRs related to the child_process subsystem. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants