{
  "source": "doc/api/tracing.md",
  "modules": [
    {
      "textRaw": "Tracing",
      "name": "tracing",
      "introduced_in": "v7.7.0",
      "desc": "<p>Trace Event provides a mechanism to centralize tracing information generated by\nV8, Node core, and userspace code.</p>\n<p>Tracing can be enabled by passing the <code>--trace-events-enabled</code> flag when starting a\nNode.js application.</p>\n<p>The set of categories for which traces are recorded can be specified using the\n<code>--trace-event-categories</code> flag followed by a list of comma separated category names.\nBy default the <code>node</code>, <code>node.async_hooks</code>, and <code>v8</code> categories are enabled.</p>\n<pre><code class=\"lang-txt\">node --trace-events-enabled --trace-event-categories v8,node,node.async_hooks server.js\n</code></pre>\n<p>Running Node.js with tracing enabled will produce log files that can be opened\nin the <a href=\"https://www.chromium.org/developers/how-tos/trace-event-profiling-tool\"><code>chrome://tracing</code></a>\ntab of Chrome.</p>\n<p>The logging file is by default called <code>node_trace.${rotation}.log</code>, where\n<code>${rotation}</code> is an incrementing log-rotation id. The filepath pattern can\nbe specified with <code>--trace-event-file-pattern</code> that accepts a template\nstring that supports <code>${rotation}</code> and <code>${pid}</code>. For example:</p>\n<pre><code class=\"lang-txt\">node --trace-events-enabled --trace-event-file-pattern &#39;${pid}-${rotation}.log&#39; server.js\n</code></pre>\n<p>Starting with Node 10.0.0, the tracing system uses the same time source as the\none used by <code>process.hrtime()</code> however the trace-event timestamps are expressed\nin microseconds, unlike <code>process.hrtime()</code> which returns nanoseconds.</p>\n",
      "type": "module",
      "displayName": "Tracing"
    }
  ]
}
