GeezerVison is showing github.com — doc: add report version and history section · nodejs/node@5263086
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: doc/api/report.md +108-22Lines changed: 108 additions & 22 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -345,28 +345,6 @@ is provided below for reference. | 345 | 345 | "writeQueueSize": 0, | 346 | 346 | "readable": true, | 347 | 347 | "writable": true | 348 | | - }, | 349 | | - { | 350 | | - "type": "tcp", | 351 | | - "is_active": true, | 352 | | - "is_referenced": true, | 353 | | - "address": "0x000055e70fcd68c8", | 354 | | - "localEndpoint": { | 355 | | - "host": "ip6-localhost", | 356 | | - "ip6": "::1", | 357 | | - "port": 52266 | 358 | | - }, | 359 | | - "remoteEndpoint": { | 360 | | - "host": "ip6-localhost", | 361 | | - "ip6": "::1", | 362 | | - "port": 38573 | 363 | | - }, | 364 | | - "sendBufferSize": 2626560, | 365 | | - "recvBufferSize": 131072, | 366 | | - "fd": 25, | 367 | | - "writeQueueSize": 0, | 368 | | - "readable": false, | 369 | | - "writable": false | 370 | 348 | } | 371 | 349 | ], | 372 | 350 | "workers": [], | @@ -599,11 +577,119 @@ includes the date, time, PID, and a sequence number. The sequence number helps | 599 | 577 | in associating the report dump with the runtime state if generated multiple | 600 | 578 | times for the same Node.js process. | 601 | 579 |
| | 580 | +## Report Version | | 581 | + | 602 | 582 | Diagnostic report has an associated single-digit version number (`report.header.reportVersion`), | 603 | 583 | uniquely representing the report format. The version number is bumped | 604 | 584 | when new key is added or removed, or the data type of a value is changed. | 605 | 585 | Report version definitions are consistent across LTS releases. | 606 | 586 |
| | 587 | +### Version history | | 588 | + | | 589 | +#### Version 4 | | 590 | + | | 591 | +<!-- YAML | | 592 | +changes: | | 593 | + - version: REPLACEME | | 594 | + pr-url: https://github.com/nodejs/node/pull/55697 | | 595 | + description: Added `--report-exclude-env` option for excluding environment variables from report generation. | | 596 | +--> | | 597 | + | | 598 | +New fields `ipv4` and `ipv6` are added to `tcp` and `udp` libuv handles endpoints. Examples: | | 599 | + | | 600 | +```json | | 601 | +{ | | 602 | + "libuv": [ | | 603 | + { | | 604 | + "type": "tcp", | | 605 | + "is_active": true, | | 606 | + "is_referenced": true, | | 607 | + "address": "0x000055e70fcb85d8", | | 608 | + "localEndpoint": { | | 609 | + "host": "localhost", | | 610 | + "ip4": "127.0.0.1", // new key | | 611 | + "port": 48986 | | 612 | + }, | | 613 | + "remoteEndpoint": { | | 614 | + "host": "localhost", | | 615 | + "ip4": "127.0.0.1", // new key | | 616 | + "port": 38573 | | 617 | + }, | | 618 | + "sendBufferSize": 2626560, | | 619 | + "recvBufferSize": 131072, | | 620 | + "fd": 24, | | 621 | + "writeQueueSize": 0, | | 622 | + "readable": true, | | 623 | + "writable": true | | 624 | + }, | | 625 | + { | | 626 | + "type": "tcp", | | 627 | + "is_active": true, | | 628 | + "is_referenced": true, | | 629 | + "address": "0x000055e70fcd68c8", | | 630 | + "localEndpoint": { | | 631 | + "host": "ip6-localhost", | | 632 | + "ip6": "::1", // new key | | 633 | + "port": 52266 | | 634 | + }, | | 635 | + "remoteEndpoint": { | | 636 | + "host": "ip6-localhost", | | 637 | + "ip6": "::1", // new key | | 638 | + "port": 38573 | | 639 | + }, | | 640 | + "sendBufferSize": 2626560, | | 641 | + "recvBufferSize": 131072, | | 642 | + "fd": 25, | | 643 | + "writeQueueSize": 0, | | 644 | + "readable": false, | | 645 | + "writable": false | | 646 | + } | | 647 | + ] | | 648 | +} | | 649 | +``` | | 650 | + | | 651 | +#### Version 3 | | 652 | + | | 653 | +<!-- YAML | | 654 | +changes: | | 655 | + - version: | | 656 | + - v19.1.0 | | 657 | + - v18.13.0 | | 658 | + pr-url: https://github.com/nodejs/node/pull/45254 | | 659 | + description: Add more memory info. | | 660 | +--> | | 661 | + | | 662 | +The following memory usage keys are added to the `resourceUsage` section. | | 663 | + | | 664 | +```json | | 665 | +{ | | 666 | + "resourceUsage": { | | 667 | + "rss": "35766272", | | 668 | + "free_memory": "1598337024", | | 669 | + "total_memory": "17179869184", | | 670 | + "available_memory": "1598337024", | | 671 | + "constrained_memory": "36624662528" | | 672 | + } | | 673 | +} | | 674 | +``` | | 675 | + | | 676 | +#### Version 2 | | 677 | + | | 678 | +<!-- YAML | | 679 | +changes: | | 680 | + - version: | | 681 | + - v13.9.0 | | 682 | + - v12.16.2 | | 683 | + pr-url: https://github.com/nodejs/node/pull/31386 | | 684 | + description: Workers are now included in the report. | | 685 | +--> | | 686 | + | | 687 | +Added [`Worker`][] support. Refer to [Interaction with workers](#interaction-with-workers) section for more details. | | 688 | + | | 689 | +#### Version 1 | | 690 | + | | 691 | +This is the first version of the diagnostic report. | | 692 | + | 607 | 693 | ## Configuration | 608 | 694 |
| 609 | 695 | Additional runtime configuration of report generation is available via | |
|