nodejs / nodejs/node

Consider updating diagnostic channel event names for bundled modules

オープン
#61,149 コメント 11 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

diagnostics_channel question
主要言語
JavaScript
スター
122k
フォーク
37.4k
平均マージ
4日 3時間
マージ済み PR(30日)
272

説明

https://openjs-foundation.slack.com/archives/C01QF9Q31QD/p1766166962883319

I'd like to propose that when Node.js bundles an external module that generates diagnostic_channel events, that those event names are differentiated from the upstream names. Consider undici, it generates events such as undici:request:pending-requests (https://undici.nodejs.org/#/docs/api/DiagnosticsChannel?id=undicirequestpending-requests). These events are emitted as-is from the Node.js bundled version of Undici, thus making it impossible to determine if the event was generated from the standalone module or the bundled module.

In day-to-day usage, this is not technically a problem. I am sure we can think of other cases where it might be an issue, but my current problem is that I need to retrieve the module version for the module that generated the event. I cannot currently rely on registerHooks to solve this because v20 does not support it.

Regardless, I just think it would be better to differentiate between upstream and bundled in event emissions for clarity.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされた Slack の議論と、issue 内の diagnostic_channel および Undici のイベントに関する参照から始めてください。組み込みモジュールとスタンドアロンモジュールを区別する命名スキームを、Node.js v20 の制約も含めて決定し、実装前に想定されるイベント名と互換性の動作を定義してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
observability
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。