Skip to content

Commit eb5aa5f

Browse files
authored
doc: add report version and history section
PR-URL: #56130 Refs: #56068 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 4211ab5 commit eb5aa5f

File tree

1 file changed

+108
-22
lines changed

1 file changed

+108
-22
lines changed

doc/api/report.md

+108-22
Original file line numberDiff line numberDiff line change
@@ -347,28 +347,6 @@ is provided below for reference.
347347
"writeQueueSize": 0,
348348
"readable": true,
349349
"writable": true
350-
},
351-
{
352-
"type": "tcp",
353-
"is_active": true,
354-
"is_referenced": true,
355-
"address": "0x000055e70fcd68c8",
356-
"localEndpoint": {
357-
"host": "ip6-localhost",
358-
"ip6": "::1",
359-
"port": 52266
360-
},
361-
"remoteEndpoint": {
362-
"host": "ip6-localhost",
363-
"ip6": "::1",
364-
"port": 38573
365-
},
366-
"sendBufferSize": 2626560,
367-
"recvBufferSize": 131072,
368-
"fd": 25,
369-
"writeQueueSize": 0,
370-
"readable": false,
371-
"writable": false
372350
}
373351
],
374352
"workers": [],
@@ -601,11 +579,119 @@ includes the date, time, PID, and a sequence number. The sequence number helps
601579
in associating the report dump with the runtime state if generated multiple
602580
times for the same Node.js process.
603581

582+
## Report Version
583+
604584
Diagnostic report has an associated single-digit version number (`report.header.reportVersion`),
605585
uniquely representing the report format. The version number is bumped
606586
when new key is added or removed, or the data type of a value is changed.
607587
Report version definitions are consistent across LTS releases.
608588

589+
### Version history
590+
591+
#### Version 4
592+
593+
<!-- YAML
594+
changes:
595+
- version: v23.3.0
596+
pr-url: https://github.com/nodejs/node/pull/55697
597+
description: Added `--report-exclude-env` option for excluding environment variables from report generation.
598+
-->
599+
600+
New fields `ipv4` and `ipv6` are added to `tcp` and `udp` libuv handles endpoints. Examples:
601+
602+
```json
603+
{
604+
"libuv": [
605+
{
606+
"type": "tcp",
607+
"is_active": true,
608+
"is_referenced": true,
609+
"address": "0x000055e70fcb85d8",
610+
"localEndpoint": {
611+
"host": "localhost",
612+
"ip4": "127.0.0.1", // new key
613+
"port": 48986
614+
},
615+
"remoteEndpoint": {
616+
"host": "localhost",
617+
"ip4": "127.0.0.1", // new key
618+
"port": 38573
619+
},
620+
"sendBufferSize": 2626560,
621+
"recvBufferSize": 131072,
622+
"fd": 24,
623+
"writeQueueSize": 0,
624+
"readable": true,
625+
"writable": true
626+
},
627+
{
628+
"type": "tcp",
629+
"is_active": true,
630+
"is_referenced": true,
631+
"address": "0x000055e70fcd68c8",
632+
"localEndpoint": {
633+
"host": "ip6-localhost",
634+
"ip6": "::1", // new key
635+
"port": 52266
636+
},
637+
"remoteEndpoint": {
638+
"host": "ip6-localhost",
639+
"ip6": "::1", // new key
640+
"port": 38573
641+
},
642+
"sendBufferSize": 2626560,
643+
"recvBufferSize": 131072,
644+
"fd": 25,
645+
"writeQueueSize": 0,
646+
"readable": false,
647+
"writable": false
648+
}
649+
]
650+
}
651+
```
652+
653+
#### Version 3
654+
655+
<!-- YAML
656+
changes:
657+
- version:
658+
- v19.1.0
659+
- v18.13.0
660+
pr-url: https://github.com/nodejs/node/pull/45254
661+
description: Add more memory info.
662+
-->
663+
664+
The following memory usage keys are added to the `resourceUsage` section.
665+
666+
```json
667+
{
668+
"resourceUsage": {
669+
"rss": "35766272",
670+
"free_memory": "1598337024",
671+
"total_memory": "17179869184",
672+
"available_memory": "1598337024",
673+
"constrained_memory": "36624662528"
674+
}
675+
}
676+
```
677+
678+
#### Version 2
679+
680+
<!-- YAML
681+
changes:
682+
- version:
683+
- v13.9.0
684+
- v12.16.2
685+
pr-url: https://github.com/nodejs/node/pull/31386
686+
description: Workers are now included in the report.
687+
-->
688+
689+
Added [`Worker`][] support. Refer to [Interaction with workers](#interaction-with-workers) section for more details.
690+
691+
#### Version 1
692+
693+
This is the first version of the diagnostic report.
694+
609695
## Configuration
610696

611697
Additional runtime configuration of report generation is available via

0 commit comments

Comments
 (0)