trace_events,async_hooks: use intrinsic trace - #22127
Conversation
AndreasMadsen
left a comment
There was a problem hiding this comment.
LGTM, but I think this should also remove the old emit API from the binding module.
|
Yeah, I'm planning to remove that but wanted to make sure there were no objections to this first |
|
Rerun interrupted CI on Linux: https://ci.nodejs.org/job/node-test-commit-linux/20514/ |
|
Trying again on linux due to a seemingly unrelated failure: https://ci.nodejs.org/job/node-test-commit-linux/20518/ |
Switch to using the 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.
Remove the older emit and categoryGroupEnabled bindings in favor of the new intrinsics
5d45705 to
c5e0db7
Compare
|
@mcollina @ofrobots @AndreasMadsen ... updated the PR to remove the older New CI: https://ci.nodejs.org/job/node-test-pull-request/16314/ |
|
Rerun CI-lite for lint issue: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/485/ |
|
CI is good |
| const procDisabled = cp.spawn( | ||
| process.execPath, | ||
| [ '--trace-event-categories', 'other', | ||
| '--no-warnings', |
There was a problem hiding this comment.
Why this? Maybe add a comment.
There was a problem hiding this comment.
just to make the test less noisy since the import of internal/test/binding emits a warning
Switch to using the 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. PR-URL: #22127 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Remove the older emit and categoryGroupEnabled bindings in favor of the new intrinsics PR-URL: #22127 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
|
Landed in c85933c and b854604 |
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.triggerAsyncIdExample new format:
trace_event.args.data.triggerAsyncId@nodejs/diagnostics @nodejs/trace-events @nodejs/async_hooks
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes