What is the problem this feature will solve?
Currently stack traces are not great with most callback-based code. Some modules exist to produce long stack traces with async_hooks, however the performance impact can be significant. V8 now has its own built-in solution, so we should investigate if that can produce better results.
What is the feature you are proposing to solve the problem?
A recent V8 update has provided the console.createTask(...) API. We can start pairing that with our existing handle callbacks to gain much better stack traces.
See: #44792
It also has the potential to be integrated with the AsyncContext spec in the future to be used as an equivalent to AsyncResource. This could mean we get context-linkage of callback-based code automatically in the future.
cc @nodejs/diagnostics
What alternatives have you considered?
No response
What is the problem this feature will solve?
Currently stack traces are not great with most callback-based code. Some modules exist to produce long stack traces with
async_hooks, however the performance impact can be significant. V8 now has its own built-in solution, so we should investigate if that can produce better results.What is the feature you are proposing to solve the problem?
A recent V8 update has provided the
console.createTask(...)API. We can start pairing that with our existing handle callbacks to gain much better stack traces.See: #44792
It also has the potential to be integrated with the
AsyncContextspec in the future to be used as an equivalent toAsyncResource. This could mean we get context-linkage of callback-based code automatically in the future.cc @nodejs/diagnostics
What alternatives have you considered?
No response