Consider updating diagnostic channel event names for bundled modules
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 122k
- Fork
- 37.4k
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 272
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với cuộc thảo luận Slack được liên kết và các tham chiếu đến sự kiện của diagnostic_channel và Undici trong issue. Xác định một quy ước đặt tên để phân biệt các module được tích hợp với các module độc lập, bao gồm cả ràng buộc của Node.js v20, và xác định tên sự kiện dự kiến cùng hành vi tương thích trước khi triển khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- observability
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100