Description
NodeRuntimeMetrics already collects heap, RSS, event loop delay, and ELU, but has no visibility into GC — often the direct cause of event-loop stalls and tail latency.
Add GC pause metrics collected via a perf_hooks PerformanceObserver on gc entries, aggregated over the existing collection interval:
gc.pause.duration (total/avg pause time)
gc.pause.max or gc.pause.p95 (worst pause in the window)
gc.count broken down by kind (minor/scavenge vs major/mark-sweep)
Opt-in by default, consistent with the other advanced metrics in the collect option. Aligns with the OTel process.runtime.v8js.gc.* conventions.
Description
NodeRuntimeMetricsalready collects heap, RSS, event loop delay, and ELU, but has no visibility into GC — often the direct cause of event-loop stalls and tail latency.Add GC pause metrics collected via a
perf_hooksPerformanceObserverongcentries, aggregated over the existing collection interval:gc.pause.duration(total/avg pause time)gc.pause.maxorgc.pause.p95(worst pause in the window)gc.countbroken down by kind (minor/scavenge vs major/mark-sweep)Opt-in by default, consistent with the other advanced metrics in the
collectoption. Aligns with the OTelprocess.runtime.v8js.gc.*conventions.