interface EventLoopMonitorOptions {
    emitSpans?: boolean;
    errorThreshold?: number;
    name?: string;
    stacks?: StackSamplingMode;
    tickInterval?: number;
    warnThreshold?: number;
    watchdog?: boolean;
}

Properties

emitSpans?: boolean
errorThreshold?: number
name?: string

When to sample the loop thread's stack through the inspector (see loop_stack_sampler): adaptive (default) after the process's first code-caused stall, always from the start, never not at all. The sampler runs on the watchdog thread, so watchdog: false means never. Sampling is not started, and is stopped, while an inspector is attached to the process: its pauses would land in the debugger's session.

tickInterval?: number
warnThreshold?: number
watchdog?: boolean

Run a watchdog worker thread whose own late wake-ups reveal when the whole process was not scheduled, so host contention is reported as such. Without it every stall is attributed to code on the loop. Default true.