Node.js v26.8.2 documentation
- Node.js v26.8.2
- Table of contents
- Index
- About this documentation
- Usage and example
- Assertion testing
- Asynchronous context tracking
- Async hooks
- Buffer
- C++ addons
- C/C++ addons with Node-API
- C++ embedder API
- Child processes
- Cluster
- Command-line options
- Console
- Crypto
- Debugger
- Deprecated APIs
- Diagnostics Channel
- DNS
- Domain
- Environment Variables
- Errors
- Events
- File system
- FFI
- Globals
- HTTP
- HTTP/2
- HTTPS
- Inspector
- Internationalization
- Iterable Streams API
- Modules: CommonJS modules
- Modules: ECMAScript modules
- Modules:
node:moduleAPI - Modules: Packages
- Modules: TypeScript
- Net
- OS
- Path
- Performance hooks
- Permissions
- Process
- Punycode
- Query strings
- Readline
- REPL
- Report
- Single executable applications
- SQLite
- Stream
- String decoder
- Test runner
- Timers
- TLS/SSL
- Trace events
- TTY
- UDP/datagram
- URL
- Utilities
- V8
- Virtual File System
- VM
- WASI
- Web Crypto API
- Web Streams API
- Worker threads
- Zlib
- Other versions
- Options
Trace events#
Stability: 1 - Experimental
The node:trace_events module provides a mechanism to centralize tracing
information generated by V8, Node.js core, and userspace code.
Tracing can be enabled with the --trace-event-categories command-line flag
or by using the node:trace_events module. The --trace-event-categories flag
accepts a list of comma-separated category names.
The available categories are:
node: An empty placeholder.node.async_hooks: Enables capture of detailedasync_hookstrace data. Theasync_hooksevents have a uniqueasyncIdand a specialtriggerIdtriggerAsyncIdproperty.node.bootstrap: Enables capture of Node.js bootstrap milestones.node.console: Enables capture ofconsole.time()andconsole.count()output.node.threadpoolwork.sync: Enables capture of trace data for threadpool synchronous operations, such asblob,zlib,cryptoandnode_api.node.threadpoolwork.async: Enables capture of trace data for threadpool asynchronous operations, such asblob,zlib,cryptoandnode_api.node.dns.native: Enables capture of trace data for DNS queries.node.net.native: Enables capture of trace data for network.node.environment: Enables capture of Node.js Environment milestones.node.fs.sync: Enables capture of trace data for file system sync methods.node.fs_dir.sync: Enables capture of trace data for file system sync directory methods.node.fs.async: Enables capture of trace data for file system async methods.node.fs_dir.async: Enables capture of trace data for file system async directory methods.node.perf: Enables capture of Performance API measurements.node.perf.usertiming: Enables capture of only Performance API User Timing measures and marks.