MCPcopy Index your code
hub / github.com/nodejs/node / toggleTraceCategoryState

Function toggleTraceCategoryState

lib/internal/process/per_thread.js:517–524  ·  view source on GitHub ↗
(asyncHooksEnabled)

Source from the content-addressed store, hash-verified

515let traceEventsAsyncHook;
516// Dynamically enable/disable the traceEventsAsyncHook
517function toggleTraceCategoryState(asyncHooksEnabled) {
518 if (asyncHooksEnabled) {
519 traceEventsAsyncHook ||= require('internal/trace_events_async_hooks').createHook();
520 traceEventsAsyncHook.enable();
521 } else if (traceEventsAsyncHook) {
522 traceEventsAsyncHook.disable();
523 }
524}
525
526const { arch, platform, version } = process;
527

Callers 1

setupTraceCategoryStateFunction · 0.85

Calls 4

createHookMethod · 0.80
requireFunction · 0.50
enableMethod · 0.45
disableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…