getsentry / getsentry/sentry-javascript

[Tracking Issue] Improve Bun Support

Đang mở
#19,707 1 bình luận 3 reaction 0 người được giao Xem trên GitHub
Tracking Issue
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ả

The Bun runtime is [getting used more and more](https://www.npmcharts.com/compare/bun) and the JavaScript SDKs should support this ongoing trend. This issue is a tracking issue that shows current missing features with the Bun runtime.

### Missing auto-instrumentation (because `module.register` is not supported in Bun)

In general, a lot of missing auto-instrumentation is based on the missing support for `module.register` in Bun ([Bun docs](https://bun.com/docs/runtime/nodejs-compat#nodemodule)). Auto-instrumentation of ES Modules in OpenTelemetry is based on `import-in-the-middle` which calls `module.register`.

A real fix would require either (a) Bun improving `module.register()` + ESM namespace mutability support, or (b) the SDK implementing a Bun-specific loader (e.g., using Bun's native [plugin API](https://bun.com/docs/runtime/plugins)) to intercept imports before they are bound.

### Missing HTTP spans

The HTTP spans are created based on what diagnostic channels publish. Bun supports diagnostics channels but does not yet publish the necessary notifications. There is an open PR for that in Bun: https://github.com/oven-sh/bun/pull/24375

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.