getsentry / getsentry/sentry-javascript

feat(node): Add garbage collection metrics to NodeRuntimeMetrics

Abierto
#23,272 1 comentario 0 reacciones 0 asignados Ver en GitHub
Feature Metrics Node.js
Lenguaje dominante
TypeScript
Estrellas
8.7k
Forks
1.8k
Merge medio
1 d 17 h
PR fusionados (30 d)
515

Descripción

### 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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start at the NodeRuntimeMetrics implementation and its existing collection interval and advanced collect options. Read the Node.js perf_hooks PerformanceObserver documentation for gc entries, then trace how current heap, RSS, event-loop delay, and ELU metrics are aggregated. Done means GC pause totals and an aggregate worst-pause metric are reported, with counts split by minor and major collection kind.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
node.js, typescript
Área
observability
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.