{
  "type": "module",
  "source": "doc/api/diagnostics_channel.md",
  "modules": [
    {
      "textRaw": "Diagnostics Channel",
      "name": "diagnostics_channel",
      "introduced_in": "v15.1.0",
      "type": "module",
      "meta": {
        "added": [
          "v15.1.0",
          "v14.17.0"
        ],
        "changes": [
          {
            "version": [
              "v19.2.0",
              "v18.13.0"
            ],
            "pr-url": "https://github.com/nodejs/node/pull/45290",
            "description": "diagnostics_channel is now Stable."
          }
        ]
      },
      "stability": 2,
      "stabilityText": "Stable",
      "desc": "<p>The <code>node:diagnostics_channel</code> module provides an API to create named channels\nto report arbitrary message data for diagnostics purposes.</p>\n<p>It can be accessed using:</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n</code></pre>\n<p>It is intended that a module writer wanting to report diagnostics messages\nwill create one or many top-level channels to report messages through.\nChannels may also be acquired at runtime but it is not encouraged\ndue to the additional overhead of doing so. Channels may be exported for\nconvenience, but as long as the name is known it can be acquired anywhere.</p>\n<p>If you intend for your module to produce diagnostics data for others to\nconsume it is recommended that you include documentation of what named\nchannels are used along with the shape of the message data. Channel names\nshould generally include the module name to avoid collisions with data from\nother modules.</p>",
      "modules": [
        {
          "textRaw": "Public API",
          "name": "public_api",
          "type": "module",
          "modules": [
            {
              "textRaw": "Overview",
              "name": "overview",
              "type": "module",
              "desc": "<p>Following is a simple overview of the public API.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\n// Get a reusable channel object\nconst channel = diagnostics_channel.channel('my-channel');\n\nfunction onMessage(message, name) {\n  // Received data\n}\n\n// Subscribe to the channel\ndiagnostics_channel.subscribe('my-channel', onMessage);\n\n// Check if the channel has an active subscriber\nif (channel.hasSubscribers) {\n  // Publish data to the channel\n  channel.publish({\n    some: 'data',\n  });\n}\n\n// Unsubscribe from the channel\ndiagnostics_channel.unsubscribe('my-channel', onMessage);\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\n// Get a reusable channel object\nconst channel = diagnostics_channel.channel('my-channel');\n\nfunction onMessage(message, name) {\n  // Received data\n}\n\n// Subscribe to the channel\ndiagnostics_channel.subscribe('my-channel', onMessage);\n\n// Check if the channel has an active subscriber\nif (channel.hasSubscribers) {\n  // Publish data to the channel\n  channel.publish({\n    some: 'data',\n  });\n}\n\n// Unsubscribe from the channel\ndiagnostics_channel.unsubscribe('my-channel', onMessage);\n</code></pre>",
              "methods": [
                {
                  "textRaw": "`diagnostics_channel.hasSubscribers(name)`",
                  "name": "hasSubscribers",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v15.1.0",
                      "v14.17.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`name` {string|symbol} The channel name",
                          "name": "name",
                          "type": "string|symbol",
                          "desc": "The channel name"
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {boolean} If there are active subscribers",
                        "name": "return",
                        "type": "boolean",
                        "desc": "If there are active subscribers"
                      }
                    }
                  ],
                  "desc": "<p>Check if there are active subscribers to the named channel. This is helpful if\nthe message you want to send might be expensive to prepare.</p>\n<p>This API is optional but helpful when trying to publish messages from very\nperformance-sensitive code.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nif (diagnostics_channel.hasSubscribers('my-channel')) {\n  // There are subscribers, prepare and publish message\n}\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nif (diagnostics_channel.hasSubscribers('my-channel')) {\n  // There are subscribers, prepare and publish message\n}\n</code></pre>"
                },
                {
                  "textRaw": "`diagnostics_channel.channel(name)`",
                  "name": "channel",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v15.1.0",
                      "v14.17.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`name` {string|symbol} The channel name",
                          "name": "name",
                          "type": "string|symbol",
                          "desc": "The channel name"
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {Channel} The named channel object",
                        "name": "return",
                        "type": "Channel",
                        "desc": "The named channel object"
                      }
                    }
                  ],
                  "desc": "<p>This is the primary entry-point for anyone wanting to publish to a named\nchannel. It produces a channel object which is optimized to reduce overhead at\npublish time as much as possible.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channel = diagnostics_channel.channel('my-channel');\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channel = diagnostics_channel.channel('my-channel');\n</code></pre>"
                },
                {
                  "textRaw": "`diagnostics_channel.subscribe(name, onMessage)`",
                  "name": "subscribe",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v18.7.0",
                      "v16.17.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`name` {string|symbol} The channel name",
                          "name": "name",
                          "type": "string|symbol",
                          "desc": "The channel name"
                        },
                        {
                          "textRaw": "`onMessage` {Function} The handler to receive channel messages",
                          "name": "onMessage",
                          "type": "Function",
                          "desc": "The handler to receive channel messages",
                          "options": [
                            {
                              "textRaw": "`message` {any} The message data",
                              "name": "message",
                              "type": "any",
                              "desc": "The message data"
                            },
                            {
                              "textRaw": "`name` {string|symbol} The name of the channel",
                              "name": "name",
                              "type": "string|symbol",
                              "desc": "The name of the channel"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Register a message handler to subscribe to this channel. This message handler\nwill be run synchronously whenever a message is published to the channel. Any\nerrors thrown in the message handler will trigger an <a href=\"process.html#event-uncaughtexception\"><code>'uncaughtException'</code></a>.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\ndiagnostics_channel.subscribe('my-channel', (message, name) => {\n  // Received data\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\ndiagnostics_channel.subscribe('my-channel', (message, name) => {\n  // Received data\n});\n</code></pre>"
                },
                {
                  "textRaw": "`diagnostics_channel.unsubscribe(name, onMessage)`",
                  "name": "unsubscribe",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v18.7.0",
                      "v16.17.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`name` {string|symbol} The channel name",
                          "name": "name",
                          "type": "string|symbol",
                          "desc": "The channel name"
                        },
                        {
                          "textRaw": "`onMessage` {Function} The previous subscribed handler to remove",
                          "name": "onMessage",
                          "type": "Function",
                          "desc": "The previous subscribed handler to remove"
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {boolean} `true` if the handler was found, `false` otherwise.",
                        "name": "return",
                        "type": "boolean",
                        "desc": "`true` if the handler was found, `false` otherwise."
                      }
                    }
                  ],
                  "desc": "<p>Remove a message handler previously registered to this channel with\n<a href=\"#diagnostics_channelsubscribename-onmessage\"><code>diagnostics_channel.subscribe(name, onMessage)</code></a>.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nfunction onMessage(message, name) {\n  // Received data\n}\n\ndiagnostics_channel.subscribe('my-channel', onMessage);\n\ndiagnostics_channel.unsubscribe('my-channel', onMessage);\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nfunction onMessage(message, name) {\n  // Received data\n}\n\ndiagnostics_channel.subscribe('my-channel', onMessage);\n\ndiagnostics_channel.unsubscribe('my-channel', onMessage);\n</code></pre>"
                },
                {
                  "textRaw": "`diagnostics_channel.tracingChannel(nameOrChannels)`",
                  "name": "tracingChannel",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`nameOrChannels` {string|TracingChannel} Channel name or object containing all the TracingChannel Channels",
                          "name": "nameOrChannels",
                          "type": "string|TracingChannel",
                          "desc": "Channel name or object containing all the TracingChannel Channels"
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {TracingChannel} Collection of channels to trace with",
                        "name": "return",
                        "type": "TracingChannel",
                        "desc": "Collection of channels to trace with"
                      }
                    }
                  ],
                  "desc": "<p>Creates a <a href=\"#class-tracingchannel\"><code>TracingChannel</code></a> wrapper for the given\n<a href=\"#tracingchannel-channels\">TracingChannel Channels</a>. If a name is given, the corresponding tracing\nchannels will be created in the form of <code>tracing:${name}:${eventType}</code> where\n<code>eventType</code> corresponds to the types of <a href=\"#tracingchannel-channels\">TracingChannel Channels</a>.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channelsByName = diagnostics_channel.tracingChannel('my-channel');\n\n// or...\n\nconst channelsByCollection = diagnostics_channel.tracingChannel({\n  start: diagnostics_channel.channel('tracing:my-channel:start'),\n  end: diagnostics_channel.channel('tracing:my-channel:end'),\n  asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'),\n  asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'),\n  error: diagnostics_channel.channel('tracing:my-channel:error'),\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channelsByName = diagnostics_channel.tracingChannel('my-channel');\n\n// or...\n\nconst channelsByCollection = diagnostics_channel.tracingChannel({\n  start: diagnostics_channel.channel('tracing:my-channel:start'),\n  end: diagnostics_channel.channel('tracing:my-channel:end'),\n  asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'),\n  asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'),\n  error: diagnostics_channel.channel('tracing:my-channel:error'),\n});\n</code></pre>"
                },
                {
                  "textRaw": "`diagnostics_channel.boundedChannel(nameOrChannels)`",
                  "name": "boundedChannel",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v26.1.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`nameOrChannels` {string|BoundedChannel} Channel name or object containing all the BoundedChannel Channels",
                          "name": "nameOrChannels",
                          "type": "string|BoundedChannel",
                          "desc": "Channel name or object containing all the BoundedChannel Channels"
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {BoundedChannel} Collection of channels to trace with",
                        "name": "return",
                        "type": "BoundedChannel",
                        "desc": "Collection of channels to trace with"
                      }
                    }
                  ],
                  "desc": "<p>Creates a <a href=\"#class-boundedchannel\"><code>BoundedChannel</code></a> wrapper for the given channels. If a name is\ngiven, the corresponding channels will be created in the form of\n<code>tracing:${name}:${eventType}</code> where <code>eventType</code> is <code>start</code> or <code>end</code>.</p>\n<p>A <code>BoundedChannel</code> is a simplified version of <a href=\"#class-tracingchannel\"><code>TracingChannel</code></a> that only\ntraces synchronous operations. It only has <code>start</code> and <code>end</code> events, without\n<code>asyncStart</code>, <code>asyncEnd</code>, or <code>error</code> events, making it suitable for tracing\noperations that don't involve asynchronous continuations or error handling.</p>\n<pre><code class=\"language-mjs\">import { boundedChannel, channel } from 'node:diagnostics_channel';\n\nconst wc = boundedChannel('my-operation');\n\n// or...\n\nconst wc2 = boundedChannel({\n  start: channel('tracing:my-operation:start'),\n  end: channel('tracing:my-operation:end'),\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const { boundedChannel, channel } = require('node:diagnostics_channel');\n\nconst wc = boundedChannel('my-operation');\n\n// or...\n\nconst wc2 = boundedChannel({\n  start: channel('tracing:my-operation:start'),\n  end: channel('tracing:my-operation:end'),\n});\n</code></pre>"
                }
              ],
              "displayName": "Overview"
            },
            {
              "textRaw": "BoundedChannel Channels",
              "name": "boundedchannel_channels",
              "type": "module",
              "desc": "<p>A <code>BoundedChannel</code> consists of two diagnostics channels representing the\nlifecycle of a scope created with the <code>using</code> syntax:</p>\n<ul>\n<li><code>tracing:${name}:start</code> - Published when the <code>using</code> statement executes (scope creation)</li>\n<li><code>tracing:${name}:end</code> - Published when exiting the block (scope disposal)</li>\n</ul>\n<p>When using the <code>using</code> syntax with [<code>boundedChannel.withScope([context])</code>][], the <code>start</code>\nevent is published immediately when the statement executes, and the <code>end</code> event\nis automatically published when disposal occurs at the end of the block. All\nevents share the same context object, which can be extended with additional\nproperties like <code>result</code> during scope execution.</p>",
              "displayName": "BoundedChannel Channels"
            },
            {
              "textRaw": "TracingChannel Channels",
              "name": "tracingchannel_channels",
              "type": "module",
              "desc": "<p>A TracingChannel is a collection of several diagnostics_channels representing\nspecific points in the execution lifecycle of a single traceable action. The\nbehavior is split into five diagnostics_channels consisting of <code>start</code>,\n<code>end</code>, <code>asyncStart</code>, <code>asyncEnd</code>, and <code>error</code>. A single traceable action will\nshare the same event object between all events, this can be helpful for\nmanaging correlation through a weakmap.</p>\n<p>These event objects will be extended with <code>result</code> or <code>error</code> values when\nthe task \"completes\". In the case of a synchronous task the <code>result</code> will be\nthe return value and the <code>error</code> will be anything thrown from the function.\nWith callback-based async functions the <code>result</code> will be the second argument\nof the callback while the <code>error</code> will either be a thrown error visible in the\n<code>end</code> event or the first callback argument in either of the <code>asyncStart</code> or\n<code>asyncEnd</code> events.</p>\n<p>To ensure only correct trace graphs are formed, events should only be published\nif subscribers are present prior to starting the trace. Subscriptions which are\nadded after the trace begins should not receive future events from that trace,\nonly future traces will be seen.</p>\n<p>Tracing channels should follow a naming pattern of:</p>\n<ul>\n<li><code>tracing:module.class.method:start</code> or <code>tracing:module.function:start</code></li>\n<li><code>tracing:module.class.method:end</code> or <code>tracing:module.function:end</code></li>\n<li><code>tracing:module.class.method:asyncStart</code> or <code>tracing:module.function:asyncStart</code></li>\n<li><code>tracing:module.class.method:asyncEnd</code> or <code>tracing:module.function:asyncEnd</code></li>\n<li><code>tracing:module.class.method:error</code> or <code>tracing:module.function:error</code></li>\n</ul>",
              "methods": [
                {
                  "textRaw": "`start(event)`",
                  "name": "start",
                  "type": "method",
                  "signatures": [
                    {
                      "params": [
                        {
                          "name": "event"
                        }
                      ]
                    }
                  ],
                  "desc": "<ul>\n<li>Name: <code>tracing:${name}:start</code></li>\n</ul>\n<p>The <code>start</code> event represents the point at which a function is called. At this\npoint the event data may contain function arguments or anything else available\nat the very start of the execution of the function.</p>"
                },
                {
                  "textRaw": "`end(event)`",
                  "name": "end",
                  "type": "method",
                  "signatures": [
                    {
                      "params": [
                        {
                          "name": "event"
                        }
                      ]
                    }
                  ],
                  "desc": "<ul>\n<li>Name: <code>tracing:${name}:end</code></li>\n</ul>\n<p>The <code>end</code> event represents the point at which a function call returns a value.\nIn the case of an async function this is when the promise returned not when the\nfunction itself makes a return statement internally. At this point, if the\ntraced function was synchronous the <code>result</code> field will be set to the return\nvalue of the function. Alternatively, the <code>error</code> field may be present to\nrepresent any thrown errors.</p>\n<p>It is recommended to listen specifically to the <code>error</code> event to track errors\nas it may be possible for a traceable action to produce multiple errors. For\nexample, an async task which fails may be started internally before the sync\npart of the task then throws an error.</p>"
                },
                {
                  "textRaw": "`asyncStart(event)`",
                  "name": "asyncStart",
                  "type": "method",
                  "signatures": [
                    {
                      "params": [
                        {
                          "name": "event"
                        }
                      ]
                    }
                  ],
                  "desc": "<ul>\n<li>Name: <code>tracing:${name}:asyncStart</code></li>\n</ul>\n<p>The <code>asyncStart</code> event represents the callback or continuation of a traceable\nfunction being reached. At this point things like callback arguments may be\navailable, or anything else expressing the \"result\" of the action.</p>\n<p>For callbacks-based functions, the first argument of the callback will be\nassigned to the <code>error</code> field, if not <code>undefined</code> or <code>null</code>, and the second\nargument will be assigned to the <code>result</code> field.</p>\n<p>For promises, the argument to the <code>resolve</code> path will be assigned to <code>result</code>\nor the argument to the <code>reject</code> path will be assign to <code>error</code>.</p>\n<p>It is recommended to listen specifically to the <code>error</code> event to track errors\nas it may be possible for a traceable action to produce multiple errors. For\nexample, an async task which fails may be started internally before the sync\npart of the task then throws an error.</p>"
                },
                {
                  "textRaw": "`asyncEnd(event)`",
                  "name": "asyncEnd",
                  "type": "method",
                  "signatures": [
                    {
                      "params": [
                        {
                          "name": "event"
                        }
                      ]
                    }
                  ],
                  "desc": "<ul>\n<li>Name: <code>tracing:${name}:asyncEnd</code></li>\n</ul>\n<p>The <code>asyncEnd</code> event represents the callback of an asynchronous function\nreturning. It's not likely event data will change after the <code>asyncStart</code> event,\nhowever it may be useful to see the point where the callback completes.</p>"
                },
                {
                  "textRaw": "`error(event)`",
                  "name": "error",
                  "type": "method",
                  "signatures": [
                    {
                      "params": [
                        {
                          "name": "event"
                        }
                      ]
                    }
                  ],
                  "desc": "<ul>\n<li>Name: <code>tracing:${name}:error</code></li>\n</ul>\n<p>The <code>error</code> event represents any error produced by the traceable function\neither synchronously or asynchronously. If an error is thrown in the\nsynchronous portion of the traced function the error will be assigned to the\n<code>error</code> field of the event and the <code>error</code> event will be triggered. If an error\nis received asynchronously through a callback or promise rejection it will also\nbe assigned to the <code>error</code> field of the event and trigger the <code>error</code> event.</p>\n<p>It is possible for a single traceable function call to produce errors multiple\ntimes so this should be considered when consuming this event. For example, if\nanother async task is triggered internally which fails and then the sync part\nof the function then throws and error two <code>error</code> events will be emitted, one\nfor the sync error and one for the async error.</p>"
                }
              ],
              "displayName": "TracingChannel Channels"
            },
            {
              "textRaw": "Built-in Channels",
              "name": "built-in_channels",
              "type": "module",
              "modules": [
                {
                  "textRaw": "Console",
                  "name": "console",
                  "type": "module",
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "events": [
                    {
                      "textRaw": "Event: `'console.log'`",
                      "name": "console.log",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`args` {any}[]",
                          "name": "args",
                          "type": "any",
                          "desc": "[]"
                        }
                      ],
                      "desc": "<p>Emitted when <code>console.log()</code> is called. Receives and array of the arguments\npassed to <code>console.log()</code>.</p>"
                    },
                    {
                      "textRaw": "Event: `'console.info'`",
                      "name": "console.info",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`args` {any}[]",
                          "name": "args",
                          "type": "any",
                          "desc": "[]"
                        }
                      ],
                      "desc": "<p>Emitted when <code>console.info()</code> is called. Receives and array of the arguments\npassed to <code>console.info()</code>.</p>"
                    },
                    {
                      "textRaw": "Event: `'console.debug'`",
                      "name": "console.debug",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`args` {any}[]",
                          "name": "args",
                          "type": "any",
                          "desc": "[]"
                        }
                      ],
                      "desc": "<p>Emitted when <code>console.debug()</code> is called. Receives and array of the arguments\npassed to <code>console.debug()</code>.</p>"
                    },
                    {
                      "textRaw": "Event: `'console.warn'`",
                      "name": "console.warn",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`args` {any}[]",
                          "name": "args",
                          "type": "any",
                          "desc": "[]"
                        }
                      ],
                      "desc": "<p>Emitted when <code>console.warn()</code> is called. Receives and array of the arguments\npassed to <code>console.warn()</code>.</p>"
                    },
                    {
                      "textRaw": "Event: `'console.error'`",
                      "name": "console.error",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`args` {any}[]",
                          "name": "args",
                          "type": "any",
                          "desc": "[]"
                        }
                      ],
                      "desc": "<p>Emitted when <code>console.error()</code> is called. Receives and array of the arguments\npassed to <code>console.error()</code>.</p>"
                    }
                  ],
                  "displayName": "Console"
                },
                {
                  "textRaw": "HTTP",
                  "name": "http",
                  "type": "module",
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "events": [
                    {
                      "textRaw": "Event: `'http.client.request.created'`",
                      "name": "http.client.request.created",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`request` {http.ClientRequest}",
                          "name": "request",
                          "type": "http.ClientRequest"
                        }
                      ],
                      "desc": "<p>Emitted when client creates a request object.\nUnlike <code>http.client.request.start</code>, this event is emitted before the request has been sent.</p>"
                    },
                    {
                      "textRaw": "Event: `'http.client.request.start'`",
                      "name": "http.client.request.start",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`request` {http.ClientRequest}",
                          "name": "request",
                          "type": "http.ClientRequest"
                        }
                      ],
                      "desc": "<p>Emitted when client starts a request.</p>"
                    },
                    {
                      "textRaw": "Event: `'http.client.request.error'`",
                      "name": "http.client.request.error",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`request` {http.ClientRequest}",
                          "name": "request",
                          "type": "http.ClientRequest"
                        },
                        {
                          "textRaw": "`error` {Error}",
                          "name": "error",
                          "type": "Error"
                        }
                      ],
                      "desc": "<p>Emitted when an error occurs during a client request.</p>"
                    },
                    {
                      "textRaw": "Event: `'http.client.response.finish'`",
                      "name": "http.client.response.finish",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`request` {http.ClientRequest}",
                          "name": "request",
                          "type": "http.ClientRequest"
                        },
                        {
                          "textRaw": "`response` {http.IncomingMessage}",
                          "name": "response",
                          "type": "http.IncomingMessage"
                        }
                      ],
                      "desc": "<p>Emitted when client receives a response.</p>"
                    },
                    {
                      "textRaw": "Event: `'http.server.request.start'`",
                      "name": "http.server.request.start",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`request` {http.IncomingMessage}",
                          "name": "request",
                          "type": "http.IncomingMessage"
                        },
                        {
                          "textRaw": "`response` {http.ServerResponse}",
                          "name": "response",
                          "type": "http.ServerResponse"
                        },
                        {
                          "textRaw": "`socket` {net.Socket}",
                          "name": "socket",
                          "type": "net.Socket"
                        },
                        {
                          "textRaw": "`server` {http.Server}",
                          "name": "server",
                          "type": "http.Server"
                        }
                      ],
                      "desc": "<p>Emitted when server receives a request.</p>"
                    },
                    {
                      "textRaw": "Event: `'http.server.response.created'`",
                      "name": "http.server.response.created",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`request` {http.IncomingMessage}",
                          "name": "request",
                          "type": "http.IncomingMessage"
                        },
                        {
                          "textRaw": "`response` {http.ServerResponse}",
                          "name": "response",
                          "type": "http.ServerResponse"
                        }
                      ],
                      "desc": "<p>Emitted when server creates a response.\nThe event is emitted before the response is sent.</p>"
                    },
                    {
                      "textRaw": "Event: `'http.server.response.finish'`",
                      "name": "http.server.response.finish",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`request` {http.IncomingMessage}",
                          "name": "request",
                          "type": "http.IncomingMessage"
                        },
                        {
                          "textRaw": "`response` {http.ServerResponse}",
                          "name": "response",
                          "type": "http.ServerResponse"
                        },
                        {
                          "textRaw": "`socket` {net.Socket}",
                          "name": "socket",
                          "type": "net.Socket"
                        },
                        {
                          "textRaw": "`server` {http.Server}",
                          "name": "server",
                          "type": "http.Server"
                        }
                      ],
                      "desc": "<p>Emitted when server sends a response.</p>"
                    }
                  ],
                  "displayName": "HTTP"
                },
                {
                  "textRaw": "HTTP/2",
                  "name": "http/2",
                  "type": "module",
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "events": [
                    {
                      "textRaw": "Event: `'http2.client.stream.created'`",
                      "name": "http2.client.stream.created",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ClientHttp2Stream}",
                          "name": "stream",
                          "type": "ClientHttp2Stream"
                        },
                        {
                          "textRaw": "`headers` {HTTP/2 Headers Object}",
                          "name": "headers",
                          "type": "HTTP/2 Headers Object"
                        }
                      ],
                      "desc": "<p>Emitted when a stream is created on the client.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.client.stream.start'`",
                      "name": "http2.client.stream.start",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ClientHttp2Stream}",
                          "name": "stream",
                          "type": "ClientHttp2Stream"
                        },
                        {
                          "textRaw": "`headers` {HTTP/2 Headers Object}",
                          "name": "headers",
                          "type": "HTTP/2 Headers Object"
                        }
                      ],
                      "desc": "<p>Emitted when a stream is started on the client.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.client.stream.error'`",
                      "name": "http2.client.stream.error",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ClientHttp2Stream}",
                          "name": "stream",
                          "type": "ClientHttp2Stream"
                        },
                        {
                          "textRaw": "`error` {Error}",
                          "name": "error",
                          "type": "Error"
                        }
                      ],
                      "desc": "<p>Emitted when an error occurs during the processing of a stream on the client.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.client.stream.finish'`",
                      "name": "http2.client.stream.finish",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ClientHttp2Stream}",
                          "name": "stream",
                          "type": "ClientHttp2Stream"
                        },
                        {
                          "textRaw": "`headers` {HTTP/2 Headers Object}",
                          "name": "headers",
                          "type": "HTTP/2 Headers Object"
                        },
                        {
                          "textRaw": "`flags` {number}",
                          "name": "flags",
                          "type": "number"
                        }
                      ],
                      "desc": "<p>Emitted when a stream is received on the client.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.client.stream.bodyChunkSent'`",
                      "name": "http2.client.stream.bodyChunkSent",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ClientHttp2Stream}",
                          "name": "stream",
                          "type": "ClientHttp2Stream"
                        },
                        {
                          "textRaw": "`writev` {boolean}",
                          "name": "writev",
                          "type": "boolean"
                        },
                        {
                          "textRaw": "`data` {Buffer|string|Buffer}[] | {Object}[]",
                          "name": "data",
                          "type": "Buffer|string|Buffer",
                          "desc": "[] | {Object}[]",
                          "options": [
                            {
                              "textRaw": "`chunk` {Buffer|string}",
                              "name": "chunk",
                              "type": "Buffer|string"
                            },
                            {
                              "textRaw": "`encoding` {string}",
                              "name": "encoding",
                              "type": "string"
                            }
                          ]
                        },
                        {
                          "textRaw": "`encoding` {string}",
                          "name": "encoding",
                          "type": "string"
                        }
                      ],
                      "desc": "<p>Emitted when a chunk of the client stream body is being sent.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.client.stream.bodySent'`",
                      "name": "http2.client.stream.bodySent",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ClientHttp2Stream}",
                          "name": "stream",
                          "type": "ClientHttp2Stream"
                        }
                      ],
                      "desc": "<p>Emitted after the client stream body has been fully sent.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.client.stream.close'`",
                      "name": "http2.client.stream.close",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ClientHttp2Stream}",
                          "name": "stream",
                          "type": "ClientHttp2Stream"
                        }
                      ],
                      "desc": "<p>Emitted when a stream is closed on the client. The HTTP/2 error code used when\nclosing the stream can be retrieved using the <code>stream.rstCode</code> property.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.server.stream.created'`",
                      "name": "http2.server.stream.created",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ServerHttp2Stream}",
                          "name": "stream",
                          "type": "ServerHttp2Stream"
                        },
                        {
                          "textRaw": "`headers` {HTTP/2 Headers Object}",
                          "name": "headers",
                          "type": "HTTP/2 Headers Object"
                        }
                      ],
                      "desc": "<p>Emitted when a stream is created on the server.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.server.stream.start'`",
                      "name": "http2.server.stream.start",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ServerHttp2Stream}",
                          "name": "stream",
                          "type": "ServerHttp2Stream"
                        },
                        {
                          "textRaw": "`headers` {HTTP/2 Headers Object}",
                          "name": "headers",
                          "type": "HTTP/2 Headers Object"
                        }
                      ],
                      "desc": "<p>Emitted when a stream is started on the server.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.server.stream.error'`",
                      "name": "http2.server.stream.error",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ServerHttp2Stream}",
                          "name": "stream",
                          "type": "ServerHttp2Stream"
                        },
                        {
                          "textRaw": "`error` {Error}",
                          "name": "error",
                          "type": "Error"
                        }
                      ],
                      "desc": "<p>Emitted when an error occurs during the processing of a stream on the server.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.server.stream.finish'`",
                      "name": "http2.server.stream.finish",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ServerHttp2Stream}",
                          "name": "stream",
                          "type": "ServerHttp2Stream"
                        },
                        {
                          "textRaw": "`headers` {HTTP/2 Headers Object}",
                          "name": "headers",
                          "type": "HTTP/2 Headers Object"
                        },
                        {
                          "textRaw": "`flags` {number}",
                          "name": "flags",
                          "type": "number"
                        }
                      ],
                      "desc": "<p>Emitted when a stream is sent on the server.</p>"
                    },
                    {
                      "textRaw": "Event: `'http2.server.stream.close'`",
                      "name": "http2.server.stream.close",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`stream` {ServerHttp2Stream}",
                          "name": "stream",
                          "type": "ServerHttp2Stream"
                        }
                      ],
                      "desc": "<p>Emitted when a stream is closed on the server. The HTTP/2 error code used when\nclosing the stream can be retrieved using the <code>stream.rstCode</code> property.</p>"
                    }
                  ],
                  "displayName": "HTTP/2"
                },
                {
                  "textRaw": "Modules",
                  "name": "modules",
                  "type": "module",
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "events": [
                    {
                      "textRaw": "Event: `'tracing:module.require:start'`",
                      "name": "tracing:module.require:start",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`event` {Object} containing the following properties",
                          "name": "event",
                          "type": "Object",
                          "desc": "containing the following properties",
                          "options": [
                            {
                              "textRaw": "`id` Argument passed to `require()`. Module name.",
                              "name": "id",
                              "desc": "Argument passed to `require()`. Module name."
                            },
                            {
                              "textRaw": "`parentFilename` Name of the module that attempted to require(id).",
                              "name": "parentFilename",
                              "desc": "Name of the module that attempted to require(id)."
                            }
                          ]
                        }
                      ],
                      "desc": "<p>Emitted when <code>require()</code> is executed. See <a href=\"#startevent\"><code>start</code> event</a>.</p>"
                    },
                    {
                      "textRaw": "Event: `'tracing:module.require:end'`",
                      "name": "tracing:module.require:end",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`event` {Object} containing the following properties",
                          "name": "event",
                          "type": "Object",
                          "desc": "containing the following properties",
                          "options": [
                            {
                              "textRaw": "`id` Argument passed to `require()`. Module name.",
                              "name": "id",
                              "desc": "Argument passed to `require()`. Module name."
                            },
                            {
                              "textRaw": "`parentFilename` Name of the module that attempted to require(id).",
                              "name": "parentFilename",
                              "desc": "Name of the module that attempted to require(id)."
                            }
                          ]
                        }
                      ],
                      "desc": "<p>Emitted when a <code>require()</code> call returns. See <a href=\"#endevent\"><code>end</code> event</a>.</p>"
                    },
                    {
                      "textRaw": "Event: `'tracing:module.require:error'`",
                      "name": "tracing:module.require:error",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`event` {Object} containing the following properties",
                          "name": "event",
                          "type": "Object",
                          "desc": "containing the following properties",
                          "options": [
                            {
                              "textRaw": "`id` Argument passed to `require()`. Module name.",
                              "name": "id",
                              "desc": "Argument passed to `require()`. Module name."
                            },
                            {
                              "textRaw": "`parentFilename` Name of the module that attempted to require(id).",
                              "name": "parentFilename",
                              "desc": "Name of the module that attempted to require(id)."
                            }
                          ]
                        },
                        {
                          "textRaw": "`error` {Error}",
                          "name": "error",
                          "type": "Error"
                        }
                      ],
                      "desc": "<p>Emitted when a <code>require()</code> throws an error. See <a href=\"#errorevent\"><code>error</code> event</a>.</p>"
                    },
                    {
                      "textRaw": "Event: `'tracing:module.import:asyncStart'`",
                      "name": "tracing:module.import:asyncStart",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`event` {Object} containing the following properties",
                          "name": "event",
                          "type": "Object",
                          "desc": "containing the following properties",
                          "options": [
                            {
                              "textRaw": "`id` Argument passed to `import()`. Module name.",
                              "name": "id",
                              "desc": "Argument passed to `import()`. Module name."
                            },
                            {
                              "textRaw": "`parentURL` URL object of the module that attempted to import(id).",
                              "name": "parentURL",
                              "desc": "URL object of the module that attempted to import(id)."
                            }
                          ]
                        }
                      ],
                      "desc": "<p>Emitted when <code>import()</code> is invoked. See <a href=\"#asyncstartevent\"><code>asyncStart</code> event</a>.</p>"
                    },
                    {
                      "textRaw": "Event: `'tracing:module.import:asyncEnd'`",
                      "name": "tracing:module.import:asyncEnd",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`event` {Object} containing the following properties",
                          "name": "event",
                          "type": "Object",
                          "desc": "containing the following properties",
                          "options": [
                            {
                              "textRaw": "`id` Argument passed to `import()`. Module name.",
                              "name": "id",
                              "desc": "Argument passed to `import()`. Module name."
                            },
                            {
                              "textRaw": "`parentURL` URL object of the module that attempted to import(id).",
                              "name": "parentURL",
                              "desc": "URL object of the module that attempted to import(id)."
                            }
                          ]
                        }
                      ],
                      "desc": "<p>Emitted when <code>import()</code> has completed. See <a href=\"#asyncendevent\"><code>asyncEnd</code> event</a>.</p>"
                    },
                    {
                      "textRaw": "Event: `'tracing:module.import:error'`",
                      "name": "tracing:module.import:error",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`event` {Object} containing the following properties",
                          "name": "event",
                          "type": "Object",
                          "desc": "containing the following properties",
                          "options": [
                            {
                              "textRaw": "`id` Argument passed to `import()`. Module name.",
                              "name": "id",
                              "desc": "Argument passed to `import()`. Module name."
                            },
                            {
                              "textRaw": "`parentURL` URL object of the module that attempted to import(id).",
                              "name": "parentURL",
                              "desc": "URL object of the module that attempted to import(id)."
                            }
                          ]
                        },
                        {
                          "textRaw": "`error` {Error}",
                          "name": "error",
                          "type": "Error"
                        }
                      ],
                      "desc": "<p>Emitted when a <code>import()</code> throws an error. See <a href=\"#errorevent\"><code>error</code> event</a>.</p>"
                    }
                  ],
                  "displayName": "Modules"
                },
                {
                  "textRaw": "NET",
                  "name": "net",
                  "type": "module",
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "events": [
                    {
                      "textRaw": "Event: `'net.client.socket'`",
                      "name": "net.client.socket",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`socket` {net.Socket|tls.TLSSocket}",
                          "name": "socket",
                          "type": "net.Socket|tls.TLSSocket"
                        }
                      ],
                      "desc": "<p>Emitted when a new TCP or pipe client socket connection is created.</p>"
                    },
                    {
                      "textRaw": "Event: `'net.server.socket'`",
                      "name": "net.server.socket",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`socket` {net.Socket}",
                          "name": "socket",
                          "type": "net.Socket"
                        }
                      ],
                      "desc": "<p>Emitted when a new TCP or pipe connection is received.</p>"
                    },
                    {
                      "textRaw": "Event: `'tracing:net.server.listen:asyncStart'`",
                      "name": "tracing:net.server.listen:asyncStart",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`server` {net.Server}",
                          "name": "server",
                          "type": "net.Server"
                        },
                        {
                          "textRaw": "`options` {Object}",
                          "name": "options",
                          "type": "Object"
                        }
                      ],
                      "desc": "<p>Emitted when <a href=\"net.html#serverlisten\"><code>net.Server.listen()</code></a> is invoked, before the port or pipe is actually setup.</p>"
                    },
                    {
                      "textRaw": "Event: `'tracing:net.server.listen:asyncEnd'`",
                      "name": "tracing:net.server.listen:asyncEnd",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`server` {net.Server}",
                          "name": "server",
                          "type": "net.Server"
                        }
                      ],
                      "desc": "<p>Emitted when <a href=\"net.html#serverlisten\"><code>net.Server.listen()</code></a> has completed and thus the server is ready to accept connection.</p>"
                    },
                    {
                      "textRaw": "Event: `'tracing:net.server.listen:error'`",
                      "name": "tracing:net.server.listen:error",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`server` {net.Server}",
                          "name": "server",
                          "type": "net.Server"
                        },
                        {
                          "textRaw": "`error` {Error}",
                          "name": "error",
                          "type": "Error"
                        }
                      ],
                      "desc": "<p>Emitted when <a href=\"net.html#serverlisten\"><code>net.Server.listen()</code></a> is returning an error.</p>"
                    }
                  ],
                  "displayName": "NET"
                },
                {
                  "textRaw": "UDP",
                  "name": "udp",
                  "type": "module",
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "events": [
                    {
                      "textRaw": "Event: `'udp.socket'`",
                      "name": "udp.socket",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`socket` {dgram.Socket}",
                          "name": "socket",
                          "type": "dgram.Socket"
                        }
                      ],
                      "desc": "<p>Emitted when a new UDP socket is created.</p>"
                    }
                  ],
                  "displayName": "UDP"
                },
                {
                  "textRaw": "Process",
                  "name": "process",
                  "type": "module",
                  "meta": {
                    "added": [
                      "v16.18.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "events": [
                    {
                      "textRaw": "Event: `'child_process'`",
                      "name": "child_process",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`process` {ChildProcess}",
                          "name": "process",
                          "type": "ChildProcess"
                        }
                      ],
                      "desc": "<p>Emitted when a new process is created.</p>\n<p><code>tracing:child_process.spawn:start</code></p>\n<ul>\n<li><code>process</code> <a href=\"child_process.html#class-childprocess\"><code>&#x3C;ChildProcess></code></a></li>\n<li><code>options</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\"><code>&#x3C;Object></code></a></li>\n</ul>\n<p>Emitted when <a href=\"child_process.html#child_processspawncommand-args-options\"><code>child_process.spawn()</code></a> is invoked, before the process is\nactually spawned.</p>\n<p><code>tracing:child_process.spawn:end</code></p>\n<ul>\n<li><code>process</code> <a href=\"child_process.html#class-childprocess\"><code>&#x3C;ChildProcess></code></a></li>\n</ul>\n<p>Emitted when <a href=\"child_process.html#child_processspawncommand-args-options\"><code>child_process.spawn()</code></a> has completed successfully and the\nprocess has been created.</p>\n<p><code>tracing:child_process.spawn:error</code></p>\n<ul>\n<li><code>process</code> <a href=\"child_process.html#class-childprocess\"><code>&#x3C;ChildProcess></code></a></li>\n<li><code>error</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error\"><code>&#x3C;Error></code></a></li>\n</ul>\n<p>Emitted when <a href=\"child_process.html#child_processspawncommand-args-options\"><code>child_process.spawn()</code></a> encounters an error.</p>"
                    },
                    {
                      "textRaw": "Event: `'process.execve'`",
                      "name": "process.execve",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`execPath` {string}",
                          "name": "execPath",
                          "type": "string"
                        },
                        {
                          "textRaw": "`args` {string}[]",
                          "name": "args",
                          "type": "string",
                          "desc": "[]"
                        },
                        {
                          "textRaw": "`env` {string}[]",
                          "name": "env",
                          "type": "string",
                          "desc": "[]"
                        }
                      ],
                      "desc": "<p>Emitted when <a href=\"process.html#processexecvefile-args-env\"><code>process.execve()</code></a> is invoked.</p>"
                    }
                  ],
                  "displayName": "Process"
                },
                {
                  "textRaw": "Web Locks",
                  "name": "web_locks",
                  "type": "module",
                  "meta": {
                    "added": [
                      "v25.9.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "desc": "<p>These channels are emitted for each <a href=\"worker_threads.html#locksrequestname-options-callback\"><code>locks.request()</code></a> call. See\n<a href=\"worker_threads.html#worker_threadslocks\"><code>worker_threads.locks</code></a> for details on Web Locks.</p>",
                  "events": [
                    {
                      "textRaw": "Event: `'locks.request.start'`",
                      "name": "locks.request.start",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`name` {string} The name of the requested lock resource.",
                          "name": "name",
                          "type": "string",
                          "desc": "The name of the requested lock resource."
                        },
                        {
                          "textRaw": "`mode` {string} The lock mode: `'exclusive'` or `'shared'`.",
                          "name": "mode",
                          "type": "string",
                          "desc": "The lock mode: `'exclusive'` or `'shared'`."
                        }
                      ],
                      "desc": "<p>Emitted when a lock request is initiated, before the lock is granted.</p>"
                    },
                    {
                      "textRaw": "Event: `'locks.request.grant'`",
                      "name": "locks.request.grant",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`name` {string} The name of the requested lock resource.",
                          "name": "name",
                          "type": "string",
                          "desc": "The name of the requested lock resource."
                        },
                        {
                          "textRaw": "`mode` {string} The lock mode: `'exclusive'` or `'shared'`.",
                          "name": "mode",
                          "type": "string",
                          "desc": "The lock mode: `'exclusive'` or `'shared'`."
                        }
                      ],
                      "desc": "<p>Emitted when a lock is successfully granted and the callback is about to run.</p>"
                    },
                    {
                      "textRaw": "Event: `'locks.request.miss'`",
                      "name": "locks.request.miss",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`name` {string} The name of the requested lock resource.",
                          "name": "name",
                          "type": "string",
                          "desc": "The name of the requested lock resource."
                        },
                        {
                          "textRaw": "`mode` {string} The lock mode: `'exclusive'` or `'shared'`.",
                          "name": "mode",
                          "type": "string",
                          "desc": "The lock mode: `'exclusive'` or `'shared'`."
                        }
                      ],
                      "desc": "<p>Emitted when <code>ifAvailable</code> is <code>true</code> and the lock is not immediately available,\nand the request callback is invoked with <code>null</code> instead of a <code>Lock</code> object.</p>"
                    },
                    {
                      "textRaw": "Event: `'locks.request.end'`",
                      "name": "locks.request.end",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`name` {string} The name of the requested lock resource.",
                          "name": "name",
                          "type": "string",
                          "desc": "The name of the requested lock resource."
                        },
                        {
                          "textRaw": "`mode` {string} The lock mode: `'exclusive'` or `'shared'`.",
                          "name": "mode",
                          "type": "string",
                          "desc": "The lock mode: `'exclusive'` or `'shared'`."
                        },
                        {
                          "textRaw": "`steal` {boolean} Whether the request uses steal semantics.",
                          "name": "steal",
                          "type": "boolean",
                          "desc": "Whether the request uses steal semantics."
                        },
                        {
                          "textRaw": "`ifAvailable` {boolean} Whether the request uses ifAvailable semantics.",
                          "name": "ifAvailable",
                          "type": "boolean",
                          "desc": "Whether the request uses ifAvailable semantics."
                        },
                        {
                          "textRaw": "`error` {Error|undefined} The error thrown by the callback, if any.",
                          "name": "error",
                          "type": "Error|undefined",
                          "desc": "The error thrown by the callback, if any."
                        }
                      ],
                      "desc": "<p>Emitted when a lock request has finished, whether the callback succeeded,\nthrew an error, or the lock was stolen.</p>"
                    }
                  ],
                  "displayName": "Web Locks"
                },
                {
                  "textRaw": "Worker Thread",
                  "name": "worker_thread",
                  "type": "module",
                  "meta": {
                    "added": [
                      "v16.18.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "events": [
                    {
                      "textRaw": "Event: `'worker_threads'`",
                      "name": "worker_threads",
                      "type": "event",
                      "params": [
                        {
                          "textRaw": "`worker` {Worker}",
                          "name": "worker",
                          "type": "Worker"
                        }
                      ],
                      "desc": "<p>Emitted when a new thread is created.</p>"
                    }
                  ],
                  "displayName": "Worker Thread"
                }
              ],
              "displayName": "Built-in Channels"
            }
          ],
          "classes": [
            {
              "textRaw": "Class: `Channel`",
              "name": "Channel",
              "type": "class",
              "meta": {
                "added": [
                  "v15.1.0",
                  "v14.17.0"
                ],
                "changes": []
              },
              "desc": "<p>The class <code>Channel</code> represents an individual named channel within the data\npipeline. It is used to track subscribers and to publish messages when there\nare subscribers present. It exists as a separate object to avoid channel\nlookups at publish time, enabling very fast publish speeds and allowing\nfor heavy use while incurring very minimal cost. Channels are created with\n<a href=\"#diagnostics_channelchannelname\"><code>diagnostics_channel.channel(name)</code></a>, constructing a channel directly\nwith <code>new Channel(name)</code> is not supported.</p>",
              "properties": [
                {
                  "textRaw": "Returns: {boolean} If there are active subscribers",
                  "name": "hasSubscribers",
                  "type": "boolean",
                  "meta": {
                    "added": [
                      "v15.1.0",
                      "v14.17.0"
                    ],
                    "changes": []
                  },
                  "desc": "<p>Check if there are active subscribers to this channel. This is helpful if\nthe message you want to send might be expensive to prepare.</p>\n<p>This API is optional but helpful when trying to publish messages from very\nperformance-sensitive code.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nif (channel.hasSubscribers) {\n  // There are subscribers, prepare and publish message\n}\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nif (channel.hasSubscribers) {\n  // There are subscribers, prepare and publish message\n}\n</code></pre>",
                  "shortDesc": "If there are active subscribers"
                }
              ],
              "methods": [
                {
                  "textRaw": "`channel.publish(message)`",
                  "name": "publish",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v15.1.0",
                      "v14.17.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`message` {any} The message to send to the channel subscribers",
                          "name": "message",
                          "type": "any",
                          "desc": "The message to send to the channel subscribers"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Publish a message to any subscribers to the channel. This will trigger\nmessage handlers synchronously so they will execute within the same context.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.publish({\n  some: 'message',\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.publish({\n  some: 'message',\n});\n</code></pre>"
                },
                {
                  "textRaw": "`channel.subscribe(onMessage)`",
                  "name": "subscribe",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v15.1.0",
                      "v14.17.0"
                    ],
                    "changes": [
                      {
                        "version": [
                          "v24.8.0",
                          "v22.20.0"
                        ],
                        "pr-url": "https://github.com/nodejs/node/pull/59758",
                        "description": "Deprecation revoked."
                      },
                      {
                        "version": [
                          "v18.7.0",
                          "v16.17.0"
                        ],
                        "pr-url": "https://github.com/nodejs/node/pull/44943",
                        "description": "Documentation-only deprecation."
                      }
                    ]
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`onMessage` {Function} The handler to receive channel messages",
                          "name": "onMessage",
                          "type": "Function",
                          "desc": "The handler to receive channel messages",
                          "options": [
                            {
                              "textRaw": "`message` {any} The message data",
                              "name": "message",
                              "type": "any",
                              "desc": "The message data"
                            },
                            {
                              "textRaw": "`name` {string|symbol} The name of the channel",
                              "name": "name",
                              "type": "string|symbol",
                              "desc": "The name of the channel"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Register a message handler to subscribe to this channel. This message handler\nwill be run synchronously whenever a message is published to the channel. Any\nerrors thrown in the message handler will trigger an <a href=\"process.html#event-uncaughtexception\"><code>'uncaughtException'</code></a>.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.subscribe((message, name) => {\n  // Received data\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.subscribe((message, name) => {\n  // Received data\n});\n</code></pre>"
                },
                {
                  "textRaw": "`channel.unsubscribe(onMessage)`",
                  "name": "unsubscribe",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v15.1.0",
                      "v14.17.0"
                    ],
                    "changes": [
                      {
                        "version": [
                          "v24.8.0",
                          "v22.20.0"
                        ],
                        "pr-url": "https://github.com/nodejs/node/pull/59758",
                        "description": "Deprecation revoked."
                      },
                      {
                        "version": [
                          "v18.7.0",
                          "v16.17.0"
                        ],
                        "pr-url": "https://github.com/nodejs/node/pull/44943",
                        "description": "Documentation-only deprecation."
                      },
                      {
                        "version": [
                          "v17.1.0",
                          "v16.14.0",
                          "v14.19.0"
                        ],
                        "pr-url": "https://github.com/nodejs/node/pull/40433",
                        "description": "Added return value. Added to channels without subscribers."
                      }
                    ]
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`onMessage` {Function} The previous subscribed handler to remove",
                          "name": "onMessage",
                          "type": "Function",
                          "desc": "The previous subscribed handler to remove"
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {boolean} `true` if the handler was found, `false` otherwise.",
                        "name": "return",
                        "type": "boolean",
                        "desc": "`true` if the handler was found, `false` otherwise."
                      }
                    }
                  ],
                  "desc": "<p>Remove a message handler previously registered to this channel with\n<a href=\"#channelsubscribeonmessage\"><code>channel.subscribe(onMessage)</code></a>.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nfunction onMessage(message, name) {\n  // Received data\n}\n\nchannel.subscribe(onMessage);\n\nchannel.unsubscribe(onMessage);\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nfunction onMessage(message, name) {\n  // Received data\n}\n\nchannel.subscribe(onMessage);\n\nchannel.unsubscribe(onMessage);\n</code></pre>"
                },
                {
                  "textRaw": "`channel.bindStore(store[, transform])`",
                  "name": "bindStore",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`store` {AsyncLocalStorage} The store to which to bind the context data",
                          "name": "store",
                          "type": "AsyncLocalStorage",
                          "desc": "The store to which to bind the context data"
                        },
                        {
                          "textRaw": "`transform` {Function} Transform context data before setting the store context",
                          "name": "transform",
                          "type": "Function",
                          "desc": "Transform context data before setting the store context",
                          "optional": true
                        }
                      ]
                    }
                  ],
                  "desc": "<p>When <a href=\"#channelrunstorescontext-fn-thisarg-args\"><code>channel.runStores(context, ...)</code></a> is called, the given context data\nwill be applied to any store bound to the channel. If the store has already been\nbound the previous <code>transform</code> function will be replaced with the new one.\nThe <code>transform</code> function may be omitted to set the given context data as the\ncontext directly.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\nimport { AsyncLocalStorage } from 'node:async_hooks';\n\nconst store = new AsyncLocalStorage();\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.bindStore(store, (data) => {\n  return { data };\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\nconst { AsyncLocalStorage } = require('node:async_hooks');\n\nconst store = new AsyncLocalStorage();\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.bindStore(store, (data) => {\n  return { data };\n});\n</code></pre>"
                },
                {
                  "textRaw": "`channel.unbindStore(store)`",
                  "name": "unbindStore",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`store` {AsyncLocalStorage} The store to unbind from the channel.",
                          "name": "store",
                          "type": "AsyncLocalStorage",
                          "desc": "The store to unbind from the channel."
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {boolean} `true` if the store was found, `false` otherwise.",
                        "name": "return",
                        "type": "boolean",
                        "desc": "`true` if the store was found, `false` otherwise."
                      }
                    }
                  ],
                  "desc": "<p>Remove a message handler previously registered to this channel with\n<a href=\"#channelbindstorestore-transform\"><code>channel.bindStore(store)</code></a>.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\nimport { AsyncLocalStorage } from 'node:async_hooks';\n\nconst store = new AsyncLocalStorage();\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.bindStore(store);\nchannel.unbindStore(store);\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\nconst { AsyncLocalStorage } = require('node:async_hooks');\n\nconst store = new AsyncLocalStorage();\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.bindStore(store);\nchannel.unbindStore(store);\n</code></pre>"
                },
                {
                  "textRaw": "`channel.runStores(context, fn[, thisArg[, ...args]])`",
                  "name": "runStores",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`context` {any} Message to send to subscribers and bind to stores",
                          "name": "context",
                          "type": "any",
                          "desc": "Message to send to subscribers and bind to stores"
                        },
                        {
                          "textRaw": "`fn` {Function} Handler to run within the entered storage context",
                          "name": "fn",
                          "type": "Function",
                          "desc": "Handler to run within the entered storage context"
                        },
                        {
                          "textRaw": "`thisArg` {any} The receiver to be used for the function call.",
                          "name": "thisArg",
                          "type": "any",
                          "desc": "The receiver to be used for the function call.",
                          "optional": true
                        },
                        {
                          "textRaw": "`...args` {any} Optional arguments to pass to the function.",
                          "name": "...args",
                          "type": "any",
                          "desc": "Optional arguments to pass to the function.",
                          "optional": true
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Applies the given data to any AsyncLocalStorage instances bound to the channel\nfor the duration of the given function, then publishes to the channel within\nthe scope of that data is applied to the stores.</p>\n<p>If a transform function was given to <a href=\"#channelbindstorestore-transform\"><code>channel.bindStore(store)</code></a> it will be\napplied to transform the message data before it becomes the context value for\nthe store. The prior storage context is accessible from within the transform\nfunction in cases where context linking is required.</p>\n<p>The context applied to the store should be accessible in any async code which\ncontinues from execution which began during the given function, however\nthere are some situations in which <a href=\"async_context.html#troubleshooting-context-loss\">context loss</a> may occur.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\nimport { AsyncLocalStorage } from 'node:async_hooks';\n\nconst store = new AsyncLocalStorage();\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.bindStore(store, (message) => {\n  const parent = store.getStore();\n  return new Span(message, parent);\n});\nchannel.runStores({ some: 'message' }, () => {\n  store.getStore(); // Span({ some: 'message' })\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\nconst { AsyncLocalStorage } = require('node:async_hooks');\n\nconst store = new AsyncLocalStorage();\n\nconst channel = diagnostics_channel.channel('my-channel');\n\nchannel.bindStore(store, (message) => {\n  const parent = store.getStore();\n  return new Span(message, parent);\n});\nchannel.runStores({ some: 'message' }, () => {\n  store.getStore(); // Span({ some: 'message' })\n});\n</code></pre>"
                },
                {
                  "textRaw": "`channel.withStoreScope(data)`",
                  "name": "withStoreScope",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v26.1.0"
                    ],
                    "changes": []
                  },
                  "stability": 1,
                  "stabilityText": "Experimental",
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`data` {any} Message to bind to stores",
                          "name": "data",
                          "type": "any",
                          "desc": "Message to bind to stores"
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {RunStoresScope} Disposable scope object",
                        "name": "return",
                        "type": "RunStoresScope",
                        "desc": "Disposable scope object"
                      }
                    }
                  ],
                  "desc": "<p>Creates a disposable scope that binds the given data to any AsyncLocalStorage\ninstances bound to the channel and publishes it to subscribers. The scope\nautomatically restores the previous storage contexts when disposed.</p>\n<p>This method enables the use of JavaScript's explicit resource management\n(<code>using</code> syntax with <code>Symbol.dispose</code>) to manage store contexts without\nclosure wrapping.</p>\n<pre><code class=\"language-mjs\">import { channel } from 'node:diagnostics_channel';\nimport { AsyncLocalStorage } from 'node:async_hooks';\n\nconst store = new AsyncLocalStorage();\nconst ch = channel('my-channel');\n\nch.bindStore(store, (message) => {\n  return { ...message, timestamp: Date.now() };\n});\n\n{\n  using scope = ch.withStoreScope({ request: 'data' });\n  // Store is entered, data is published\n  console.log(store.getStore()); // { request: 'data', timestamp: ... }\n}\n// Store is automatically restored on scope exit\n</code></pre>\n<pre><code class=\"language-cjs\">const { channel } = require('node:diagnostics_channel');\nconst { AsyncLocalStorage } = require('node:async_hooks');\n\nconst store = new AsyncLocalStorage();\nconst ch = channel('my-channel');\n\nch.bindStore(store, (message) => {\n  return { ...message, timestamp: Date.now() };\n});\n\n{\n  using scope = ch.withStoreScope({ request: 'data' });\n  // Store is entered, data is published\n  console.log(store.getStore()); // { request: 'data', timestamp: ... }\n}\n// Store is automatically restored on scope exit\n</code></pre>"
                }
              ]
            },
            {
              "textRaw": "Class: `RunStoresScope`",
              "name": "RunStoresScope",
              "type": "class",
              "meta": {
                "added": [
                  "v26.1.0"
                ],
                "changes": []
              },
              "stability": 1,
              "stabilityText": "Experimental",
              "desc": "<p>The class <code>RunStoresScope</code> represents a disposable scope created by\n<a href=\"#channelwithstorescopedata\"><code>channel.withStoreScope(data)</code></a>. It manages the lifecycle of store\ncontexts and ensures they are properly restored when the scope exits.</p>\n<p>The scope must be used with the <code>using</code> syntax to ensure proper disposal.</p>"
            },
            {
              "textRaw": "Class: `TracingChannel`",
              "name": "TracingChannel",
              "type": "class",
              "meta": {
                "added": [
                  "v19.9.0",
                  "v18.19.0"
                ],
                "changes": []
              },
              "stability": 1,
              "stabilityText": "Experimental",
              "desc": "<p>The class <code>TracingChannel</code> is a collection of <a href=\"#tracingchannel-channels\">TracingChannel Channels</a> which\ntogether express a single traceable action. It is used to formalize and\nsimplify the process of producing events for tracing application flow.\n<a href=\"#diagnostics_channeltracingchannelnameorchannels\"><code>diagnostics_channel.tracingChannel()</code></a> is used to construct a\n<code>TracingChannel</code>. As with <code>Channel</code> it is recommended to create and reuse a\nsingle <code>TracingChannel</code> at the top-level of the file rather than creating them\ndynamically.</p>",
              "methods": [
                {
                  "textRaw": "`tracingChannel.subscribe(subscribers)`",
                  "name": "subscribe",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`subscribers` {Object} Set of TracingChannel Channels subscribers",
                          "name": "subscribers",
                          "type": "Object",
                          "desc": "Set of TracingChannel Channels subscribers",
                          "options": [
                            {
                              "textRaw": "`start` {Function} The `start` event subscriber",
                              "name": "start",
                              "type": "Function",
                              "desc": "The `start` event subscriber"
                            },
                            {
                              "textRaw": "`end` {Function} The `end` event subscriber",
                              "name": "end",
                              "type": "Function",
                              "desc": "The `end` event subscriber"
                            },
                            {
                              "textRaw": "`asyncStart` {Function} The `asyncStart` event subscriber",
                              "name": "asyncStart",
                              "type": "Function",
                              "desc": "The `asyncStart` event subscriber"
                            },
                            {
                              "textRaw": "`asyncEnd` {Function} The `asyncEnd` event subscriber",
                              "name": "asyncEnd",
                              "type": "Function",
                              "desc": "The `asyncEnd` event subscriber"
                            },
                            {
                              "textRaw": "`error` {Function} The `error` event subscriber",
                              "name": "error",
                              "type": "Function",
                              "desc": "The `error` event subscriber"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Helper to subscribe a collection of functions to the corresponding channels.\nThis is the same as calling <a href=\"#channelsubscribeonmessage\"><code>channel.subscribe(onMessage)</code></a> on each channel\nindividually.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.subscribe({\n  start(message) {\n    // Handle start message\n  },\n  end(message) {\n    // Handle end message\n  },\n  asyncStart(message) {\n    // Handle asyncStart message\n  },\n  asyncEnd(message) {\n    // Handle asyncEnd message\n  },\n  error(message) {\n    // Handle error message\n  },\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.subscribe({\n  start(message) {\n    // Handle start message\n  },\n  end(message) {\n    // Handle end message\n  },\n  asyncStart(message) {\n    // Handle asyncStart message\n  },\n  asyncEnd(message) {\n    // Handle asyncEnd message\n  },\n  error(message) {\n    // Handle error message\n  },\n});\n</code></pre>"
                },
                {
                  "textRaw": "`tracingChannel.unsubscribe(subscribers)`",
                  "name": "unsubscribe",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`subscribers` {Object} Set of TracingChannel Channels subscribers",
                          "name": "subscribers",
                          "type": "Object",
                          "desc": "Set of TracingChannel Channels subscribers",
                          "options": [
                            {
                              "textRaw": "`start` {Function} The `start` event subscriber",
                              "name": "start",
                              "type": "Function",
                              "desc": "The `start` event subscriber"
                            },
                            {
                              "textRaw": "`end` {Function} The `end` event subscriber",
                              "name": "end",
                              "type": "Function",
                              "desc": "The `end` event subscriber"
                            },
                            {
                              "textRaw": "`asyncStart` {Function} The `asyncStart` event subscriber",
                              "name": "asyncStart",
                              "type": "Function",
                              "desc": "The `asyncStart` event subscriber"
                            },
                            {
                              "textRaw": "`asyncEnd` {Function} The `asyncEnd` event subscriber",
                              "name": "asyncEnd",
                              "type": "Function",
                              "desc": "The `asyncEnd` event subscriber"
                            },
                            {
                              "textRaw": "`error` {Function} The `error` event subscriber",
                              "name": "error",
                              "type": "Function",
                              "desc": "The `error` event subscriber"
                            }
                          ]
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {boolean} `true` if all handlers were successfully unsubscribed, and `false` otherwise.",
                        "name": "return",
                        "type": "boolean",
                        "desc": "`true` if all handlers were successfully unsubscribed, and `false` otherwise."
                      }
                    }
                  ],
                  "desc": "<p>Helper to unsubscribe a collection of functions from the corresponding channels.\nThis is the same as calling <a href=\"#channelunsubscribeonmessage\"><code>channel.unsubscribe(onMessage)</code></a> on each channel\nindividually.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.unsubscribe({\n  start(message) {\n    // Handle start message\n  },\n  end(message) {\n    // Handle end message\n  },\n  asyncStart(message) {\n    // Handle asyncStart message\n  },\n  asyncEnd(message) {\n    // Handle asyncEnd message\n  },\n  error(message) {\n    // Handle error message\n  },\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.unsubscribe({\n  start(message) {\n    // Handle start message\n  },\n  end(message) {\n    // Handle end message\n  },\n  asyncStart(message) {\n    // Handle asyncStart message\n  },\n  asyncEnd(message) {\n    // Handle asyncEnd message\n  },\n  error(message) {\n    // Handle error message\n  },\n});\n</code></pre>"
                },
                {
                  "textRaw": "`tracingChannel.traceSync(fn[, context[, thisArg[, ...args]]])`",
                  "name": "traceSync",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`fn` {Function} Function to wrap a trace around",
                          "name": "fn",
                          "type": "Function",
                          "desc": "Function to wrap a trace around"
                        },
                        {
                          "textRaw": "`context` {Object} Shared object to correlate events through",
                          "name": "context",
                          "type": "Object",
                          "desc": "Shared object to correlate events through",
                          "optional": true
                        },
                        {
                          "textRaw": "`thisArg` {any} The receiver to be used for the function call",
                          "name": "thisArg",
                          "type": "any",
                          "desc": "The receiver to be used for the function call",
                          "optional": true
                        },
                        {
                          "textRaw": "`...args` {any} Optional arguments to pass to the function",
                          "name": "...args",
                          "type": "any",
                          "desc": "Optional arguments to pass to the function",
                          "optional": true
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {any} The return value of the given function",
                        "name": "return",
                        "type": "any",
                        "desc": "The return value of the given function"
                      }
                    }
                  ],
                  "desc": "<p>Trace a synchronous function call. This will always produce a <a href=\"#startevent\"><code>start</code> event</a>\nand <a href=\"#endevent\"><code>end</code> event</a> around the execution and may produce an <a href=\"#errorevent\"><code>error</code> event</a>\nif the given function throws an error. This will run the given function using\n<a href=\"#channelrunstorescontext-fn-thisarg-args\"><code>channel.runStores(context, ...)</code></a> on the <code>start</code> channel which ensures all\nevents should have any bound stores set to match this trace context.</p>\n<p>To ensure only correct trace graphs are formed, events will only be published\nif subscribers are present prior to starting the trace. Subscriptions which are\nadded after the trace begins will not receive future events from that trace,\nonly future traces will be seen.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.traceSync(() => {\n  // Do something\n}, {\n  some: 'thing',\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.traceSync(() => {\n  // Do something\n}, {\n  some: 'thing',\n});\n</code></pre>"
                },
                {
                  "textRaw": "`tracingChannel.tracePromise(fn[, context[, thisArg[, ...args]]])`",
                  "name": "tracePromise",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": [
                      {
                        "version": "v26.0.0",
                        "pr-url": "https://github.com/nodejs/node/pull/61766",
                        "description": "Custom thenables will no longer be wrapped in native Promises. Non-thenables will be returned with a warning."
                      }
                    ]
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`fn` {Function} Function to wrap a trace around",
                          "name": "fn",
                          "type": "Function",
                          "desc": "Function to wrap a trace around"
                        },
                        {
                          "textRaw": "`context` {Object} Shared object to correlate trace events through",
                          "name": "context",
                          "type": "Object",
                          "desc": "Shared object to correlate trace events through",
                          "optional": true
                        },
                        {
                          "textRaw": "`thisArg` {any} The receiver to be used for the function call",
                          "name": "thisArg",
                          "type": "any",
                          "desc": "The receiver to be used for the function call",
                          "optional": true
                        },
                        {
                          "textRaw": "`...args` {any} Optional arguments to pass to the function",
                          "name": "...args",
                          "type": "any",
                          "desc": "Optional arguments to pass to the function",
                          "optional": true
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {any} The return value of the given function, or the result of calling `.then(...)` on the return value if the tracing channel has active subscribers. If the return value is not a Promise or thenable, then it is returned as-is and a warning is emitted.",
                        "name": "return",
                        "type": "any",
                        "desc": "The return value of the given function, or the result of calling `.then(...)` on the return value if the tracing channel has active subscribers. If the return value is not a Promise or thenable, then it is returned as-is and a warning is emitted."
                      }
                    }
                  ],
                  "desc": "<p>Trace an asynchronous function call which returns a <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise\"><code>&#x3C;Promise></code></a> or <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables\">thenable object</a>. This will always produce a <a href=\"#startevent\"><code>start</code> event</a> and\n<a href=\"#endevent\"><code>end</code> event</a> around the synchronous portion of the function execution, and\nwill produce an <a href=\"#asyncstartevent\"><code>asyncStart</code> event</a> and <a href=\"#asyncendevent\"><code>asyncEnd</code> event</a> when the\nreturned promise is resolved or rejected. It may also produce an\n<a href=\"#errorevent\"><code>error</code> event</a> if the given function throws an error or the returned promise\nis rejected. This will run the given function using\n<a href=\"#channelrunstorescontext-fn-thisarg-args\"><code>channel.runStores(context, ...)</code></a> on the <code>start</code> channel which ensures all\nevents should have any bound stores set to match this trace context.</p>\n<p>If the value returned by <code>fn</code> is not a Promise or thenable, then it will be\nreturned with a warning, and no <code>asyncStart</code> or <code>asyncEnd</code> events will be\nproduced.</p>\n<p>To ensure only correct trace graphs are formed, events will only be published\nif subscribers are present prior to starting the trace. Subscriptions which are\nadded after the trace begins will not receive future events from that trace,\nonly future traces will be seen.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.tracePromise(async () => {\n  // Do something\n}, {\n  some: 'thing',\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.tracePromise(async () => {\n  // Do something\n}, {\n  some: 'thing',\n});\n</code></pre>"
                },
                {
                  "textRaw": "`tracingChannel.traceCallback(fn[, position[, context[, thisArg[, ...args]]]])`",
                  "name": "traceCallback",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v19.9.0",
                      "v18.19.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`fn` {Function} callback using function to wrap a trace around",
                          "name": "fn",
                          "type": "Function",
                          "desc": "callback using function to wrap a trace around"
                        },
                        {
                          "textRaw": "`position` {number} Zero-indexed argument position of expected callback (defaults to last argument if `undefined` is passed)",
                          "name": "position",
                          "type": "number",
                          "desc": "Zero-indexed argument position of expected callback (defaults to last argument if `undefined` is passed)",
                          "optional": true
                        },
                        {
                          "textRaw": "`context` {Object} Shared object to correlate trace events through (defaults to `{}` if `undefined` is passed)",
                          "name": "context",
                          "type": "Object",
                          "desc": "Shared object to correlate trace events through (defaults to `{}` if `undefined` is passed)",
                          "optional": true
                        },
                        {
                          "textRaw": "`thisArg` {any} The receiver to be used for the function call",
                          "name": "thisArg",
                          "type": "any",
                          "desc": "The receiver to be used for the function call",
                          "optional": true
                        },
                        {
                          "textRaw": "`...args` {any} arguments to pass to the function (must include the callback)",
                          "name": "...args",
                          "type": "any",
                          "desc": "arguments to pass to the function (must include the callback)",
                          "optional": true
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {any} The return value of the given function",
                        "name": "return",
                        "type": "any",
                        "desc": "The return value of the given function"
                      }
                    }
                  ],
                  "desc": "<p>Trace a callback-receiving function call. The callback is expected to follow\nthe error as first arg convention typically used. This will always produce a\n<a href=\"#startevent\"><code>start</code> event</a> and <a href=\"#endevent\"><code>end</code> event</a> around the synchronous portion of the\nfunction execution, and will produce a <a href=\"#asyncstartevent\"><code>asyncStart</code> event</a> and\n<a href=\"#asyncendevent\"><code>asyncEnd</code> event</a> around the callback execution. It may also produce an\n<a href=\"#errorevent\"><code>error</code> event</a> if the given function throws or the first argument passed to\nthe callback is set. This will run the given function using\n<a href=\"#channelrunstorescontext-fn-thisarg-args\"><code>channel.runStores(context, ...)</code></a> on the <code>start</code> channel which ensures all\nevents should have any bound stores set to match this trace context.</p>\n<p>To ensure only correct trace graphs are formed, events will only be published\nif subscribers are present prior to starting the trace. Subscriptions which are\nadded after the trace begins will not receive future events from that trace,\nonly future traces will be seen.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.traceCallback((arg1, callback) => {\n  // Do something\n  callback(null, 'result');\n}, 1, {\n  some: 'thing',\n}, thisArg, arg1, callback);\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nchannels.traceCallback((arg1, callback) => {\n  // Do something\n  callback(null, 'result');\n}, 1, {\n  some: 'thing',\n}, thisArg, arg1, callback);\n</code></pre>\n<p>The callback will also be run with <a href=\"#channelrunstorescontext-fn-thisarg-args\"><code>channel.runStores(context, ...)</code></a> which\nenables context loss recovery in some cases.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\nimport { AsyncLocalStorage } from 'node:async_hooks';\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\nconst myStore = new AsyncLocalStorage();\n\n// The start channel sets the initial store data to something\n// and stores that store data value on the trace context object\nchannels.start.bindStore(myStore, (data) => {\n  const span = new Span(data);\n  data.span = span;\n  return span;\n});\n\n// Then asyncStart can restore from that data it stored previously\nchannels.asyncStart.bindStore(myStore, (data) => {\n  return data.span;\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\nconst { AsyncLocalStorage } = require('node:async_hooks');\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\nconst myStore = new AsyncLocalStorage();\n\n// The start channel sets the initial store data to something\n// and stores that store data value on the trace context object\nchannels.start.bindStore(myStore, (data) => {\n  const span = new Span(data);\n  data.span = span;\n  return span;\n});\n\n// Then asyncStart can restore from that data it stored previously\nchannels.asyncStart.bindStore(myStore, (data) => {\n  return data.span;\n});\n</code></pre>"
                }
              ],
              "properties": [
                {
                  "textRaw": "Returns: {boolean} `true` if any of the individual channels has a subscriber, `false` if not.",
                  "name": "hasSubscribers",
                  "type": "boolean",
                  "meta": {
                    "added": [
                      "v22.0.0",
                      "v20.13.0"
                    ],
                    "changes": []
                  },
                  "desc": "<p>This is a helper method available on a <a href=\"#class-tracingchannel\"><code>TracingChannel</code></a> instance to check if\nany of the <a href=\"#tracingchannel-channels\">TracingChannel Channels</a> have subscribers. A <code>true</code> is returned if\nany of them have at least one subscriber, a <code>false</code> is returned otherwise.</p>\n<pre><code class=\"language-mjs\">import diagnostics_channel from 'node:diagnostics_channel';\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nif (channels.hasSubscribers) {\n  // Do something\n}\n</code></pre>\n<pre><code class=\"language-cjs\">const diagnostics_channel = require('node:diagnostics_channel');\n\nconst channels = diagnostics_channel.tracingChannel('my-channel');\n\nif (channels.hasSubscribers) {\n  // Do something\n}\n</code></pre>",
                  "shortDesc": "`true` if any of the individual channels has a subscriber, `false` if not."
                }
              ]
            },
            {
              "textRaw": "Class: `BoundedChannel`",
              "name": "BoundedChannel",
              "type": "class",
              "meta": {
                "added": [
                  "v26.1.0"
                ],
                "changes": []
              },
              "stability": 1,
              "stabilityText": "Experimental",
              "desc": "<p>The class <code>BoundedChannel</code> is a simplified version of <a href=\"#class-tracingchannel\"><code>TracingChannel</code></a> that\nonly traces synchronous operations. It consists of two channels (<code>start</code> and\n<code>end</code>) instead of five, omitting the <code>asyncStart</code>, <code>asyncEnd</code>, and <code>error</code>\nevents. This makes it suitable for tracing operations that don't involve\nasynchronous continuations or error handling.</p>\n<p>Like <code>TracingChannel</code>, it is recommended to create and reuse a single\n<code>BoundedChannel</code> at the top-level of the file rather than creating them\ndynamically.</p>",
              "properties": [
                {
                  "textRaw": "Returns: {boolean} `true` if any of the individual channels has a subscriber, `false` if not.",
                  "name": "hasSubscribers",
                  "type": "boolean",
                  "meta": {
                    "added": [
                      "v26.1.0"
                    ],
                    "changes": []
                  },
                  "desc": "<p>Check if any of the <code>start</code> or <code>end</code> channels have subscribers.</p>\n<pre><code class=\"language-mjs\">import { boundedChannel } from 'node:diagnostics_channel';\n\nconst wc = boundedChannel('my-operation');\n\nif (wc.hasSubscribers) {\n  // There are subscribers, perform traced operation\n}\n</code></pre>\n<pre><code class=\"language-cjs\">const { boundedChannel } = require('node:diagnostics_channel');\n\nconst wc = boundedChannel('my-operation');\n\nif (wc.hasSubscribers) {\n  // There are subscribers, perform traced operation\n}\n</code></pre>",
                  "shortDesc": "`true` if any of the individual channels has a subscriber, `false` if not."
                }
              ],
              "methods": [
                {
                  "textRaw": "`boundedChannel.subscribe(handlers)`",
                  "name": "subscribe",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v26.1.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`handlers` {Object} Set of channel subscribers",
                          "name": "handlers",
                          "type": "Object",
                          "desc": "Set of channel subscribers",
                          "options": [
                            {
                              "textRaw": "`start` {Function} The start event subscriber",
                              "name": "start",
                              "type": "Function",
                              "desc": "The start event subscriber"
                            },
                            {
                              "textRaw": "`end` {Function} The end event subscriber",
                              "name": "end",
                              "type": "Function",
                              "desc": "The end event subscriber"
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Subscribe to the bounded channel events. This is equivalent to calling\n<a href=\"#channelsubscribeonmessage\"><code>channel.subscribe(onMessage)</code></a> on each channel individually.</p>\n<pre><code class=\"language-mjs\">import { boundedChannel } from 'node:diagnostics_channel';\n\nconst wc = boundedChannel('my-operation');\n\nwc.subscribe({\n  start(message) {\n    // Handle start\n  },\n  end(message) {\n    // Handle end\n  },\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const { boundedChannel } = require('node:diagnostics_channel');\n\nconst wc = boundedChannel('my-operation');\n\nwc.subscribe({\n  start(message) {\n    // Handle start\n  },\n  end(message) {\n    // Handle end\n  },\n});\n</code></pre>"
                },
                {
                  "textRaw": "`boundedChannel.unsubscribe(handlers)`",
                  "name": "unsubscribe",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v26.1.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`handlers` {Object} Set of channel subscribers",
                          "name": "handlers",
                          "type": "Object",
                          "desc": "Set of channel subscribers",
                          "options": [
                            {
                              "textRaw": "`start` {Function} The start event subscriber",
                              "name": "start",
                              "type": "Function",
                              "desc": "The start event subscriber"
                            },
                            {
                              "textRaw": "`end` {Function} The end event subscriber",
                              "name": "end",
                              "type": "Function",
                              "desc": "The end event subscriber"
                            }
                          ]
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {boolean} `true` if all handlers were successfully unsubscribed, `false` otherwise.",
                        "name": "return",
                        "type": "boolean",
                        "desc": "`true` if all handlers were successfully unsubscribed, `false` otherwise."
                      }
                    }
                  ],
                  "desc": "<p>Unsubscribe from the bounded channel events. This is equivalent to calling\n<a href=\"#channelunsubscribeonmessage\"><code>channel.unsubscribe(onMessage)</code></a> on each channel individually.</p>\n<pre><code class=\"language-mjs\">import { boundedChannel } from 'node:diagnostics_channel';\n\nconst wc = boundedChannel('my-operation');\n\nconst handlers = {\n  start(message) {},\n  end(message) {},\n};\n\nwc.subscribe(handlers);\nwc.unsubscribe(handlers);\n</code></pre>\n<pre><code class=\"language-cjs\">const { boundedChannel } = require('node:diagnostics_channel');\n\nconst wc = boundedChannel('my-operation');\n\nconst handlers = {\n  start(message) {},\n  end(message) {},\n};\n\nwc.subscribe(handlers);\nwc.unsubscribe(handlers);\n</code></pre>"
                },
                {
                  "textRaw": "`boundedChannel.run(context, fn[, thisArg[, ...args]])`",
                  "name": "run",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v26.1.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`context` {Object} Shared object to correlate events through",
                          "name": "context",
                          "type": "Object",
                          "desc": "Shared object to correlate events through"
                        },
                        {
                          "textRaw": "`fn` {Function} Function to wrap a trace around",
                          "name": "fn",
                          "type": "Function",
                          "desc": "Function to wrap a trace around"
                        },
                        {
                          "textRaw": "`thisArg` {any} The receiver to be used for the function call",
                          "name": "thisArg",
                          "type": "any",
                          "desc": "The receiver to be used for the function call",
                          "optional": true
                        },
                        {
                          "textRaw": "`...args` {any} Optional arguments to pass to the function",
                          "name": "...args",
                          "type": "any",
                          "desc": "Optional arguments to pass to the function",
                          "optional": true
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {any} The return value of the given function",
                        "name": "return",
                        "type": "any",
                        "desc": "The return value of the given function"
                      }
                    }
                  ],
                  "desc": "<p>Trace a synchronous function call. This will produce a <code>start</code> event and <code>end</code>\nevent around the execution. This runs the given function using\n<a href=\"#channelrunstorescontext-fn-thisarg-args\"><code>channel.runStores(context, ...)</code></a> on the <code>start</code> channel which ensures all\nevents have any bound stores set to match this trace context.</p>\n<pre><code class=\"language-mjs\">import { boundedChannel } from 'node:diagnostics_channel';\n\nconst wc = boundedChannel('my-operation');\n\nconst result = wc.run({ operationId: '123' }, () => {\n  // Perform operation\n  return 42;\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const { boundedChannel } = require('node:diagnostics_channel');\n\nconst wc = boundedChannel('my-operation');\n\nconst result = wc.run({ operationId: '123' }, () => {\n  // Perform operation\n  return 42;\n});\n</code></pre>"
                },
                {
                  "textRaw": "`boundedChannel.withScope([context])`",
                  "name": "withScope",
                  "type": "method",
                  "meta": {
                    "added": [
                      "v26.1.0"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "params": [
                        {
                          "textRaw": "`context` {Object} Shared object to correlate events through",
                          "name": "context",
                          "type": "Object",
                          "desc": "Shared object to correlate events through",
                          "optional": true
                        }
                      ],
                      "return": {
                        "textRaw": "Returns: {BoundedChannelScope} Disposable scope object",
                        "name": "return",
                        "type": "BoundedChannelScope",
                        "desc": "Disposable scope object"
                      }
                    }
                  ],
                  "desc": "<p>Create a disposable scope for tracing a synchronous operation using JavaScript's\nexplicit resource management (<code>using</code> syntax). The scope automatically publishes\n<code>start</code> and <code>end</code> events, enters bound stores, and handles cleanup when disposed.</p>\n<pre><code class=\"language-mjs\">import { boundedChannel } from 'node:diagnostics_channel';\n\nconst wc = boundedChannel('my-operation');\n\nconst context = { operationId: '123' };\n{\n  using scope = wc.withScope(context);\n  // Stores are entered, start event is published\n\n  // Perform work and set result on context\n  context.result = 42;\n}\n// End event is published, stores are restored automatically\n</code></pre>\n<pre><code class=\"language-cjs\">const { boundedChannel } = require('node:diagnostics_channel');\n\nconst wc = boundedChannel('my-operation');\n\nconst context = { operationId: '123' };\n{\n  using scope = wc.withScope(context);\n  // Stores are entered, start event is published\n\n  // Perform work and set result on context\n  context.result = 42;\n}\n// End event is published, stores are restored automatically\n</code></pre>"
                }
              ]
            },
            {
              "textRaw": "Class: `BoundedChannelScope`",
              "name": "BoundedChannelScope",
              "type": "class",
              "meta": {
                "added": [
                  "v26.1.0"
                ],
                "changes": []
              },
              "stability": 1,
              "stabilityText": "Experimental",
              "desc": "<p>The class <code>BoundedChannelScope</code> represents a disposable scope created by\n<a href=\"#boundedchannelwithscopecontext\"><code>boundedChannel.withScope(context)</code></a>. It manages the lifecycle of a traced\noperation, automatically publishing events and managing store contexts.</p>\n<p>The scope must be used with the <code>using</code> syntax to ensure proper disposal.</p>\n<pre><code class=\"language-mjs\">import { boundedChannel } from 'node:diagnostics_channel';\n\nconst wc = boundedChannel('my-operation');\n\nconst context = {};\n{\n  using scope = wc.withScope(context);\n  // Start event is published, stores are entered\n  context.result = performOperation();\n  // End event is automatically published at end of block\n}\n</code></pre>\n<pre><code class=\"language-cjs\">const { boundedChannel } = require('node:diagnostics_channel');\n\nconst wc = boundedChannel('my-operation');\n\nconst context = {};\n{\n  using scope = wc.withScope(context);\n  // Start event is published, stores are entered\n  context.result = performOperation();\n  // End event is automatically published at end of block\n}\n</code></pre>"
            }
          ],
          "displayName": "Public API"
        }
      ],
      "displayName": "Diagnostics Channel"
    }
  ]
}