Consider updating diagnostic channel event names for bundled modules
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.3k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit der verknüpften Slack-Diskussion sowie den Verweisen auf diagnostic_channel und Undici-Events im Issue. Bestimmen Sie ein Benennungsschema, das gebündelte von eigenständigen Modulen unterscheidet, einschließlich der Node.js v20-Einschränkung, und definieren Sie die erwarteten Event-Namen und das Kompatibilitätsverhalten vor der Implementierung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- observability
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100