11cb0ef41Sopenharmony_ci# Diagnostic tooling support tiers 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciDiagnostic tooling is important to the consumers of Node.js. It is used both 41cb0ef41Sopenharmony_ciin development and in production in order to investigate problems. The failure 51cb0ef41Sopenharmony_ciof one of these tools may be as big a problem for an end user as a bug within 61cb0ef41Sopenharmony_cithe runtime itself. 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciThe Node.js project has assessed the tools and the APIs which support those 91cb0ef41Sopenharmony_citools. Each of the tools and APIs has been put into one of 101cb0ef41Sopenharmony_cithe following tiers. 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ci* Tier 1 - Must always be working (CI tests passing) for all 131cb0ef41Sopenharmony_ci Current and LTS Node.js releases. A release will not be shipped if the test 141cb0ef41Sopenharmony_ci suite for the tool/API is not green. To be considered for inclusion 151cb0ef41Sopenharmony_ci in this tier it must have a good test suite and that test suite and a job 161cb0ef41Sopenharmony_ci must exist in the Node.js CI so that it can be run as part of the release 171cb0ef41Sopenharmony_ci process. Tests on `main` will be run nightly when possible to provide 181cb0ef41Sopenharmony_ci early warning of potential issues. No commit to the current and LTS 191cb0ef41Sopenharmony_ci release branches should break this tool/API if the next major release 201cb0ef41Sopenharmony_ci is within 1 month. In addition: 211cb0ef41Sopenharmony_ci * The maintainers of the tool must remain responsive when there 221cb0ef41Sopenharmony_ci are problems; 231cb0ef41Sopenharmony_ci * The tool must be actively used by the ecosystem; 241cb0ef41Sopenharmony_ci * The tool must be heavily depended on; 251cb0ef41Sopenharmony_ci * The tool must have a guide or other documentation in the Node.js GitHub 261cb0ef41Sopenharmony_ci organization or website; 271cb0ef41Sopenharmony_ci * The tool must be working on all supported platforms; 281cb0ef41Sopenharmony_ci * The tool must only be using APIs exposed by Node.js as opposed to 291cb0ef41Sopenharmony_ci its dependencies; and 301cb0ef41Sopenharmony_ci * The tool must be open source. 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ci* Tier 2 - Must be working (CI tests passing) for all 331cb0ef41Sopenharmony_ci LTS releases. An LTS release will not be shipped if the test 341cb0ef41Sopenharmony_ci suite for the tool/API is not green. To be considered for inclusion 351cb0ef41Sopenharmony_ci in this tier it must have a good test suite and that test suite and a job 361cb0ef41Sopenharmony_ci must exist in the Node.js CI so that it can be run as part of the release 371cb0ef41Sopenharmony_ci process. In addition: 381cb0ef41Sopenharmony_ci * The maintainers of the tool must remain responsive when 391cb0ef41Sopenharmony_ci there are problems; 401cb0ef41Sopenharmony_ci * The tool must be actively used by the ecosystem; 411cb0ef41Sopenharmony_ci * The tool must be heavily depended on; 421cb0ef41Sopenharmony_ci * The tool must have a guide or other documentation in the Node.js GitHub 431cb0ef41Sopenharmony_ci organization or website; 441cb0ef41Sopenharmony_ci * The tool must be open source. 451cb0ef41Sopenharmony_ci 461cb0ef41Sopenharmony_ci* Tier 3 - If possible its test suite will be run at least nightly 471cb0ef41Sopenharmony_ci in the Node.js CI or in CITGM, and issues opened for failures. 481cb0ef41Sopenharmony_ci Does not block shipping a release. 491cb0ef41Sopenharmony_ci 501cb0ef41Sopenharmony_ci* Tier 4 - Does not block shipping a release. 511cb0ef41Sopenharmony_ci 521cb0ef41Sopenharmony_ci* Unclassified - tool/API is new or does not have the required testing in the 531cb0ef41Sopenharmony_ci Node.js CI in order to qualify for a higher tier. 541cb0ef41Sopenharmony_ci 551cb0ef41Sopenharmony_ciThe choice of which tier a particular tool will be assigned to, will be a 561cb0ef41Sopenharmony_cicollaborative decision between Diagnostics WG and Release WG. Some of the 571cb0ef41Sopenharmony_cicriteria considered might be: 581cb0ef41Sopenharmony_ci 591cb0ef41Sopenharmony_ci* If the tool fits into a key category as listed below. 601cb0ef41Sopenharmony_ci* Whether the tool is actively used by the ecosystem. 611cb0ef41Sopenharmony_ci* The availability of alternatives. 621cb0ef41Sopenharmony_ci* Impact to the overall ecosystem if the tool is not working. 631cb0ef41Sopenharmony_ci* The availability of reliable test suite that can be integrated into our CI. 641cb0ef41Sopenharmony_ci* The availability of maintainer or community collaborator who will help 651cb0ef41Sopenharmony_ci resolve issues when there are CI failures. 661cb0ef41Sopenharmony_ci* If the tool is maintained by the Node.js Foundation GitHub organization. 671cb0ef41Sopenharmony_ci 681cb0ef41Sopenharmony_ciThe current categories of tools/APIs that fall under these Tiers are: 691cb0ef41Sopenharmony_ci 701cb0ef41Sopenharmony_ci* FFDC (F) - First failure data capture, easy to consume initial diagnostic 711cb0ef41Sopenharmony_ci information. 721cb0ef41Sopenharmony_ci* Tracing (T) - use of logging to provide information about execution flow. 731cb0ef41Sopenharmony_ci* Memory (M) - tools that provide additional information about memory 741cb0ef41Sopenharmony_ci used in the Heap or by native code. 751cb0ef41Sopenharmony_ci* Profiling (P) - tools that provide additional information about where 761cb0ef41Sopenharmony_ci CPU cycles are being spent. 771cb0ef41Sopenharmony_ci* AsyncFlow (A) - tools that provide additional insight into asynchronous 781cb0ef41Sopenharmony_ci execution flow. 791cb0ef41Sopenharmony_ci 801cb0ef41Sopenharmony_ci## Adding a tool to this list 811cb0ef41Sopenharmony_ci 821cb0ef41Sopenharmony_ciAny tool that might be used to investigate issues when running Node.js can 831cb0ef41Sopenharmony_cibe added to the list. If there is a new tool that should be added to the 841cb0ef41Sopenharmony_cilist, it should start by being added to the "Not yet classified" or 851cb0ef41Sopenharmony_ci"Tier 4" lists. Once it has been added to the list "promotion" to Tier 3 861cb0ef41Sopenharmony_cithrough Tier 1 requires that the requirements listed above be met AND 871cb0ef41Sopenharmony_cihave agreement from Diagnostics WG and Release WG based on the criteria 881cb0ef41Sopenharmony_cilisted above. 891cb0ef41Sopenharmony_ci 901cb0ef41Sopenharmony_ci## Tiers 911cb0ef41Sopenharmony_ci 921cb0ef41Sopenharmony_ciThe tools are currently assigned to Tiers as follows: 931cb0ef41Sopenharmony_ci 941cb0ef41Sopenharmony_ci## Tier 1 951cb0ef41Sopenharmony_ci 961cb0ef41Sopenharmony_ci| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | 971cb0ef41Sopenharmony_ci| --------- | --------------------- | ----------------------------- | ----------------------- | ----------- | 981cb0ef41Sopenharmony_ci| FFDC | [diagnostic report][] | Yes | Yes | 1 | 991cb0ef41Sopenharmony_ci| | | | | | 1001cb0ef41Sopenharmony_ci 1011cb0ef41Sopenharmony_ci## Tier 2 1021cb0ef41Sopenharmony_ci 1031cb0ef41Sopenharmony_ci| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | 1041cb0ef41Sopenharmony_ci| --------- | ------------- | ----------------------------- | ----------------------- | ----------- | 1051cb0ef41Sopenharmony_ci| | | | | | 1061cb0ef41Sopenharmony_ci 1071cb0ef41Sopenharmony_ci## Tier 3 1081cb0ef41Sopenharmony_ci 1091cb0ef41Sopenharmony_ci| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | 1101cb0ef41Sopenharmony_ci| --------- | ------------------------------------ | ----------------------------- | ----------------------- | ----------- | 1111cb0ef41Sopenharmony_ci| Profiling | V8 CPU profiler | Partial (V8 Tests) | Yes | 1 | 1121cb0ef41Sopenharmony_ci| Profiling | --prof/--prof-process flags | Yes | Yes | 1 | 1131cb0ef41Sopenharmony_ci| Profiling | V8 CodeEventHandler API | Partial (V8 Tests) | Yes | 2 | 1141cb0ef41Sopenharmony_ci| Profiling | V8 --interpreted-frames-native-stack | Yes | Yes | 2 | 1151cb0ef41Sopenharmony_ci| Profiling | [Linux perf][] | Yes | Partial | 2 | 1161cb0ef41Sopenharmony_ci| Profiling | [node-clinic][] | No | No | 3 | 1171cb0ef41Sopenharmony_ci| Debugger | [Chrome Dev tools][] | No | No | 3 | 1181cb0ef41Sopenharmony_ci 1191cb0ef41Sopenharmony_ci## Tier 4 1201cb0ef41Sopenharmony_ci 1211cb0ef41Sopenharmony_ci| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | 1221cb0ef41Sopenharmony_ci| --------- | ------------- | ----------------------------- | ----------------------- | ----------- | 1231cb0ef41Sopenharmony_ci| Profiling | [0x][] | No | No | 3 | 1241cb0ef41Sopenharmony_ci 1251cb0ef41Sopenharmony_ci## Not yet classified 1261cb0ef41Sopenharmony_ci 1271cb0ef41Sopenharmony_ci| Tool Type | Tool/API Name | Regular Testing in Node.js CI | Integrated with Node.js | Target Tier | 1281cb0ef41Sopenharmony_ci| --------- | ----------------------------------------- | ----------------------------- | ----------------------- | ----------- | 1291cb0ef41Sopenharmony_ci| Memory | V8 heap profiler | No | Yes | 1 | 1301cb0ef41Sopenharmony_ci| Memory | V8 sampling heap profiler | No | Yes | 1 | 1311cb0ef41Sopenharmony_ci| AsyncFlow | [Async Hooks (API)][] | ? | Yes | 1 | 1321cb0ef41Sopenharmony_ci| Debugger | V8 Debug protocol (API) | No | Yes | 1 | 1331cb0ef41Sopenharmony_ci| Debugger | [Command line Debug Client][] | ? | Yes | 1 | 1341cb0ef41Sopenharmony_ci| Tracing | [trace\_events (API)][trace_events (API)] | No | Yes | 1 | 1351cb0ef41Sopenharmony_ci| Tracing | trace\_gc | No | Yes | 1 | 1361cb0ef41Sopenharmony_ci 1371cb0ef41Sopenharmony_ci[0x]: https://github.com/davidmarkclements/0x 1381cb0ef41Sopenharmony_ci[Async Hooks (API)]: https://nodejs.org/api/async_hooks.html 1391cb0ef41Sopenharmony_ci[Chrome Dev Tools]: https://developer.chrome.com/docs/devtools/ 1401cb0ef41Sopenharmony_ci[Command line Debug Client]: https://nodejs.org/api/inspector.html 1411cb0ef41Sopenharmony_ci[Linux perf]: https://perf.wiki.kernel.org/index.php/Main_Page 1421cb0ef41Sopenharmony_ci[diagnostic report]: https://nodejs.org/api/report.html 1431cb0ef41Sopenharmony_ci[node-clinic]: https://github.com/clinicjs/node-clinic/ 1441cb0ef41Sopenharmony_ci[trace_events (API)]: https://nodejs.org/api/tracing.html 145