getsentry / getsentry/sentry-javascript

feat(node): Add garbage collection metrics to NodeRuntimeMetrics

オープン
#23,272 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Feature Metrics Node.js
主要言語
TypeScript
スター
8.7k
フォーク
1.8k
平均マージ
1日 17時間
マージ済み PR(30日)
515

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
node.js, typescript
領域
observability
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。