getsentry / getsentry/sentry-javascript

[Feature] Profiling support in Bun

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

説明

### Description

Bun is not built on V8 but on Safari's JavaScriptCore (JSC), and we would need an entirely different implementation of the profiler in order to be able to profile the bun runtime.

Upvoting on this issue helps us prioritize this (see statement below in "Priority").

Also mentioned in this issue:
- https://github.com/getsentry/sentry-javascript/issues/13577

### Reasons against implementing this

- Bun has a `console.profile` which might do something similar (at least in dev): https://bun.com/reference/globals/Console/profile
- Production profiling in Bun still has issues, for example leaking memory very fast: https://github.com/oven-sh/bun/issues/24858

### Resources

- https://bun.com/reference/bun/jsc/profile
- https://bun.com/docs/project/benchmarking

**Related APIs**
- Node `inspector.Profile` in Bun (`inspector` not implemented in Bun): https://bun.com/reference/node/inspector/Profiler/Profile
- Node GC Profiler (implemented in Bun, but different profiler): https://bun.sh/reference/node/v8/GCProfiler

### Priority

React with 👍 to help prioritize this feature. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.

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

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

調査の方向性

まず Bun の jsc/profile とベンチマーク用リソースを読み、次に issue で言及されている関連する Node inspector.Profile および GCProfiler API と比較してください。実装を提案する前に、Sentry JavaScript の統合ポイントと関連するテストを特定してください。inspector API の未実装部分に依存せずに Bun のランタイムプロファイリングがサポートされれば、作業は完了です。

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

評価

技術スタック
bun, typescript
領域
observability
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

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

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