Skip to content

trace_events,async_hooks: use intrinsic trace

Switch to using the faster intrinsic trace event method for async_hooks.

This is a breaking change because of the switch to a nested data argument for exec id and trigger id values. Although trace events and async hooks are still both experimental, there is code deployed that depends on the current data format for async hooks in trace events (e.g. https://github.com/nearform/node-clinic). Therefore, while this is not technically semver-major, I'm marking it "don't land" on 10, 8, and 6.

/cc @mcollina ... once this does land in master, clinic would need to be updated to account for the new data format. The version metadata in the trace event log can be used to determine which format applies.

Example old format: trace_event.args.triggerAsyncId Example new format: trace_event.args.data.triggerAsyncId

@nodejs/diagnostics @nodejs/trace-events @nodejs/async_hooks

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading