You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ability to report diagnostic messages that align with Node's standard. What can be reported is more than just traces, it can report metrics, logs and other diagnostics.
This can be used by anyone as a plugin system where all can consume the events that are emitted by Diagnostics Channel.
OTel can be layered on top of Diagnostics Channel, the reverse is not available at this time.
Non-Goals
Background
The current implementation in Next is the OTel API though this allows for a tracing standard it does not allow for other diagnostics tools to perform alongside. Such as using Node's Diagnostics Channel.
The current standard for Node is Diagnostics channel, it reports diagnostics messages through channels, it can report traces, metrics, logs and other diagnostics. The cost and benefit of DC (Diagnostics Channel) is there are no external dependencies and minimal performance overhead when emitted and even less when consumed.
There was an initial attempt to implement DC alongside OTel, in order to maintain the current implementation and also broaden it to include the Node standard. However, due to how OTel is currently implemented the OTel context class is private and does not allow for another diagnostics tool to add any spans or other data to the context.
Proposal
There is a [draft PR] (#69466) that would implement DC alongside OTel by simply wrapping this.handleRequestImpl in tracePromise which is a function built into DC that returns a promise and will publish all events, such that it will always produce a start and end event, and publish an asyncStart and asyncEnd event when a promise continuation is reached and will ensure all events are set to any bound stores set to match the trace context.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Goals
Non-Goals
Background
The current implementation in Next is the OTel API though this allows for a tracing standard it does not allow for other diagnostics tools to perform alongside. Such as using Node's Diagnostics Channel.
The current standard for Node is Diagnostics channel, it reports diagnostics messages through channels, it can report traces, metrics, logs and other diagnostics. The cost and benefit of DC (Diagnostics Channel) is there are no external dependencies and minimal performance overhead when emitted and even less when consumed.
There was an initial attempt to implement DC alongside OTel, in order to maintain the current implementation and also broaden it to include the Node standard. However, due to how OTel is currently implemented the OTel context class is private and does not allow for another diagnostics tool to add any spans or other data to the context.
Proposal
There is a [draft PR] (#69466) that would implement DC alongside OTel by simply wrapping
this.handleRequestImpl
in tracePromise which is a function built into DC that returns a promise and will publish all events, such that it will always produce a start and end event, and publish an asyncStart and asyncEnd event when a promise continuation is reached and will ensure all events are set to any bound stores set to match the trace context.Beta Was this translation helpful? Give feedback.
All reactions