test_runner: publish to TracingChannel node.test for OTel instrumentation#62502
Closed
test_runner: publish to TracingChannel node.test for OTel instrumentation#62502
Conversation
Collaborator
|
Review requested:
|
There was a problem hiding this comment.
Pull request overview
Adds diagnostics channel tracing hooks to the built-in Node.js test runner to enable OpenTelemetry-style instrumentation via diagnostics_channel.tracingChannel('node.test').
Changes:
- Introduce a shared
TracingChannel('node.test')for the internal test runner and export it from test-runner utils. - Wrap test/suite execution with
start.runStores(...)and publishend/errorlifecycle events. - Add documentation and new tests/fixtures validating lifecycle events and
AsyncLocalStoragepropagation viabindStore().
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/parallel/test-runner-diagnostics-channel.js | New parallel test covering start/end/error events and bindStore propagation. |
| test/fixtures/test-runner/diagnostics-channel-error-test.js | Fixture that intentionally fails to validate error event emission. |
| lib/internal/test_runner/utils.js | Creates and exports testChannel via diagnostics_channel.tracingChannel('node.test'). |
| lib/internal/test_runner/test.js | Instruments Test.run() and Suite.createBuild() to emit tracing lifecycle events and run stores. |
| doc/api/test.md | Documents the new tracing channels and provides an OpenTelemetry integration example. |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
atlowChemi
reviewed
Mar 30, 2026
atlowChemi
reviewed
Mar 30, 2026
c3b10e5 to
75fe3a3
Compare
atlowChemi
reviewed
Mar 30, 2026
atlowChemi
reviewed
Mar 30, 2026
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62502 +/- ##
==========================================
+ Coverage 88.93% 89.80% +0.87%
==========================================
Files 699 699
Lines 216379 216445 +66
Branches 41281 41384 +103
==========================================
+ Hits 192434 194380 +1946
+ Misses 15976 14152 -1824
+ Partials 7969 7913 -56
π New features to boost your workflow:
|
75fe3a3 to
c055153
Compare
atlowChemi
approved these changes
Apr 13, 2026
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/62502
β Done loading data for nodejs/node/pull/62502
----------------------------------- PR info ------------------------------------
Title test_runner: publish to TracingChannel node.test for OTel instrumentation (#62502)
Author Moshe Atlow <moshe@atlow.co.il> (@MoLow)
Branch MoLow:test-tracing-channel -> nodejs:main
Labels author ready, needs-ci, test_runner
Commits 1
- test_runner: publish to TracingChannel node.test for instrumentation
Committers 1
- Moshe Atlow <moshe@atlow.co.il>
PR-URL: https://github.com/nodejs/node/pull/62502
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/62502
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
--------------------------------------------------------------------------------
βΉ This PR was created on Mon, 30 Mar 2026 10:54:04 GMT
β Approvals: 2
β - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/62502#pullrequestreview-4029731280
β - Chemi Atlow (@atlowChemi): https://github.com/nodejs/node/pull/62502#pullrequestreview-4096943911
β Last GitHub CI successful
βΉ Last Full PR CI on 2026-04-13T10:18:09Z: https://ci.nodejs.org/job/node-test-pull-request/72667/
- Querying data for job/node-test-pull-request/72667/
β Build data downloaded
β Last Jenkins CI successful
--------------------------------------------------------------------------------
β No git cherry-pick in progress
β No git am in progress
β No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
* branch main -> FETCH_HEAD
β origin/main is now up-to-date
- Downloading patch for 62502
From https://github.com/nodejs/node
* branch refs/pull/62502/merge -> FETCH_HEAD
β Fetched commits as 0546822c31ae..c05515399d7c
--------------------------------------------------------------------------------
[main dd8b286573] test_runner: publish to TracingChannel node.test for instrumentation
Author: Moshe Atlow <moshe@atlow.co.il>
Date: Mon Mar 30 11:37:41 2026 +0300
5 files changed, 309 insertions(+), 2 deletions(-)
create mode 100644 test/fixtures/test-runner/diagnostics-channel-error-test.js
create mode 100644 test/parallel/test-runner-diagnostics-channel.js
β Patches applied
--------------------------------------------------------------------------------
--------------------------------- New Message ----------------------------------
PR-URL: https://github.com/nodejs/node/pull/62502
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
--------------------------------------------------------------------------------
[main f9214280b4] PR-URL: https://github.com/nodejs/node/pull/62502 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Author: Moshe Atlow <moshe@atlow.co.il>
Date: Mon Mar 30 11:37:41 2026 +0300
5 files changed, 309 insertions(+), 2 deletions(-)
create mode 100644 test/fixtures/test-runner/diagnostics-channel-error-test.js
create mode 100644 test/parallel/test-runner-diagnostics-channel.js
β f9214280b4f4f3e9c87f8fb6a35d9ff1c504ce86
β 0:0 no Co-authored-by metadata co-authored-by-is-trailer
β 0:0 skipping fixes-url fixes-url
β 1:0 blank line expected after title line-after-title
β 0:0 line-lengths are valid line-length
β 0:0 metadata is at end of message metadata-end
β 0:0 Commit must have a PR-URL. pr-url
β 0:0 reviewers are valid reviewers
β 0:0 Invalid subsystem: "PR-URL" subsystem
β 0:0 Title is formatted correctly. title-format
β 0:0 Title is <= 50 columns. title-length
βΉ Please fix the commit message and try again.
Please manually ammend the commit message, by running
`git commit --amend`
Once commit message is fixed, finish the landing command running
`git node land --continue`https://github.com/nodejs/node/actions/runs/24341353410 |
MoLow
added a commit
that referenced
this pull request
Apr 13, 2026
Signed-off-by: Moshe Atlow <moshe@atlow.co.il> PR-URL: #62502 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Member
Author
|
Landed in c7d05fc |
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.
No description provided.