getsentry / getsentry/sentry-javascript

[Feature] Profiling support in Bun

Đang mở
#19,726 1 bình luận 13 reaction 0 người được giao Xem trên GitHub
Bun Feature Profiles
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.