diagnostics_channel: add a channel for filesystem operations
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 45/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- javascript, node.js
- 領域
- api, operating-systems
研究方向
從公開的 node:fs 和 node:fs/promises API 以及現有的 node:diagnostics_channel TracingChannel 慣例入手;比較 sync、callback、promise、stream 和 filehandle 路徑。確定發布層和 channel 名稱,同時讓 payload 不依賴 FSReqCallback 細節。完成標準是:受支援的公開檔案系統操作會發布文件所述的生命週期事件和中繼資料。
由索引模型根據 Issue 內容生成。
描述
What is the problem this feature will solve?
node:diagnostics_channel does not currently expose a built-in channel for filesystem operations performed through node:fs and node:fs/promises.
The proposed scope is the public filesystem APIs. Calls made directly by native addons or arbitrary native code do not need to be included in this contract.
What is the feature you are proposing to solve the problem?
Add a built-in tracing channel family for filesystem operations. One possible naming scheme is:
tracing:fs.operation:starttracing:fs.operation:endtracing:fs.operation:asyncStarttracing:fs.operation:asyncEndtracing:fs.operation:error
The shared event object could contain:
operation: a stable operation name such asopen,read,stat,readdir, orrealpath.api:sync,callback,promise,stream, orfilehandle.- Path, source/destination, or file descriptor fields when applicable, preserving the value type passed by the caller.
resultanderrorfollowing the existingTracingChannelconventions.
Large read/write buffers should not be copied into event metadata. The exact publication layer—public API wrappers or the lowest shared internal filesystem layer—can be determined during implementation, but the documented payload should remain independent of internal FSReqCallback details.
Using one operation family with an operation field avoids requiring wildcard channel subscriptions while allowing subscribers to filter individual operations.
What alternatives have you considered?
Wrapping exports from node:fs and node:fs/promises is incomplete when references have already been captured and requires synchronization with named built-in ESM exports. async_hooks exposes asynchronous resource lifecycles rather than stable filesystem operation semantics and does not cover synchronous calls. Trace events use a different consumption API and payload contract.
- 主要語言
- JavaScript
- 星號
- 122k
- 分支
- 38.4k
- 平均合併
- 4 天 10 小時
- 30 天內合併 PR
- 291
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nodejs/node 的其他 Issue
-
doc
難度 1/5 1 小時以內 新手友好度 90/100
維護者通常 1 天內回覆
-
doc
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
build
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
nodejs/node#65994 · 2 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
-
feature request
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
saadeghi/daisyui#4780 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
-
accessibility bug embed websites
難度 2/5 1-3 小時 新手友好度 78/100
quarto-dev/quarto-cli#14972 ·
維護者通常 1 天內回覆
-
has-readme needs-attention new-tool repo-verified
難度 2/5 1-3 小時 新手友好度 65/100
shanselman/TinyToolTown#834 · 2 則留言 ·
維護者通常 6 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
siderolabs/talos-design-system#16 ·
維護者通常 1 天內回覆