• Home
  • Raw
  • Download

Lines Matching refs:report

1 # Diagnostic report
8 <!-- name=report -->
12 The report is intended for development, test and production use, to capture
15 usage etc. With the report option enabled, diagnostic reports can be triggered
19 A complete example report that was generated on an uncaught exception
28 "filename": "report.20181221.005011.8974.0.001.json",
35 "--report-uncaught-exception",
36 "/home/nodeuser/project/node/test/report/test-exception.js",
99 "at myException (/home/nodeuser/project/node/test/report/test-exception.js:9:11)",
100 "at Object.<anonymous> (/home/nodeuser/project/node/test/report/test-exception.js:12:3)",
113 …"symbol": "report::GetNodeReport(v8::Isolate*, node::Environment*, char const*, char const*, v8::L…
117 "symbol": "report::GetReport(v8::FunctionCallbackInfo<v8::Value> const&) [./node]"
395 node --report-uncaught-exception --report-on-signal \
396 --report-on-fatalerror app.js
399 * `--report-uncaught-exception` Enables report to be generated on
403 * `--report-on-signal` Enables report to be generated upon receiving
405 below on how to modify the signal that triggers the report.) Default signal is
406 `SIGUSR2`. Useful when a report needs to be triggered from another program.
407 Application monitors may leverage this feature to collect report at regular
410 Signal based report generation is not supported in Windows.
412 Under normal circumstances, there is no need to modify the report triggering
414 flag helps to change the signal for report generation and preserve the original
417 * `--report-on-fatalerror` Enables the report to be triggered on fatal errors
423 * `--report-compact` Write reports in a compact format, single-line JSON, more
427 * `--report-directory` Location at which the report will be
430 * `--report-filename` Name of the file to which the report will be
433 * `--report-signal` Sets or resets the signal for report generation
436 A report can also be triggered via an API call from a JavaScript application:
439 process.report.writeReport();
443 the name of a file into which the report is written.
446 process.report.writeReport('./foo.json');
451 report. When using report to handle errors in a callback or an exception
452 handler, this allows the report to include the location of the original error as
459 process.report.writeReport(err);
471 process.report.writeReport(filename, err);
476 The content of the diagnostic report can be returned as a JavaScript Object
480 const report = process.report.getReport();
481 console.log(typeof report === 'object'); // true
483 // Similar to process.report.writeReport() output
484 console.log(JSON.stringify(report, null, 2));
489 report.
492 const report = process.report.getReport(new Error('custom error'));
493 console.log(typeof report === 'object'); // true
500 The content of the report consists of a header section containing the event
504 showing CPU and memory usage and system limits. An example report can be
509 > process.report.writeReport();
510 Writing Node.js report to file: report.20181126.091102.8480.0.001.json
511 Node.js report completed
515 When a report is written, start and end messages are issued to stderr
516 and the filename of the report is returned to the caller. The default filename
518 in associating the report dump with the runtime state if generated multiple
523 Additional runtime configuration of report generation is available via
524 the following properties of `process.report`:
536 to intercept external triggers for report generation. Defaults to
541 will result in report being written to the associated standard streams.
546 `directory` specifies the filesystem directory where the report will be written.
551 // Trigger report only on uncaught exceptions.
552 process.report.reportOnFatalError = false;
553 process.report.reportOnSignal = false;
554 process.report.reportOnUncaughtException = true;
556 // Trigger report for both internal errors as well as external signal.
557 process.report.reportOnFatalError = true;
558 process.report.reportOnSignal = true;
559 process.report.reportOnUncaughtException = false;
562 process.report.reportOnFatalError = false;
563 process.report.reportOnUncaughtException = false;
564 process.report.reportOnSignal = true;
565 process.report.signal = 'SIGQUIT';
572 NODE_OPTIONS="--report-uncaught-exception \
573 --report-on-fatalerror --report-on-signal \
574 --report-signal=SIGUSR2 --report-filename=./report.json \
575 --report-directory=/home/nodeuser"
588 description: Workers are now included in the report.
595 thread as part of the `workers` section, with each Worker generating a report
596 in the standard report format.
598 The thread which is generating the report will wait for the reports from Worker
600 running JavaScript and the event loop are interrupted to generate the report.