# nodejsCaptureMode
This is an optional argument that selects how the yc-360 script captures diagnostics from a Node.js application: through the yCrash hook loaded into the process, or through Node's own built in signal based flags.
Type: string
Default: hook
Supported values
| Value | Description |
|---|---|
hook | Captures through the yCrash Node.js hook. Full artifact set. Default. |
signal | Captures through Node's built in --report-on-signal and --trace-gc flags, with no hook required. Reduced artifact set. Linux and macOS only. |
Usage:
- Omitted: the script assumes Hook Mode and expects the target application to have the yCrash Node.js hook loaded.
- Specified as
signal: the script falls back to Signal Mode. Your application must be started with--report-on-signaland, for GC data,--trace-gc.
How it works:
- When omitted, the yc-360 script looks for a running hook instance registered by the target Node.js process and captures the full diagnostic set through it.
- When set to
signal, the script instead sends the configured signal to the target process and reads the resulting diagnostic report, without requiring the hook to be loaded. - This argument only takes effect when
appRuntimeis set tonodejs.
See Node.js Diagnostic Capture for a full comparison of what each mode captures.
Example (YAML):
options:
onlyCapture: true
appRuntime: nodejs
nodejsCaptureMode: signal
1
2
3
4
2
3
4
Example (CLI):
./yc -onlyCapture -p 22534 -appRuntime=nodejs -nodejsCaptureMode=signal
1