getsentry / getsentry/sentry-javascript

Elysia events report as `sentry.javascript.bun`

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

説明

Running under both node and bun, with the built `@sentry/elysia`:

```
sdk: {"name":"sentry.javascript.bun","version":"10.67.0",
"packages":[{"name":"npm:@sentry/bun","version":"10.67.0"}]}
```

`sentry.javascript.elysia` never appears. `packages/elysia/src/sdk.ts:44`copies `userOptions` into `options` *before* calling `applySdkMetadata(userOptions, 'elysia', ...)`. When `userOptions._metadata` is undefined, `applySdkMetadata` creates a fresh `_metadata` on `userOptions`, which the already-made copy does not have. `initBun(options)` then applies its own `'bun'` metadata to the copy.

The Elysia SDK is invisible in SDK adoption telemetry, and support cannot tell Elysia reports from plain Bun ones.

**Work item.** Call `applySdkMetadata(options, ...)` on the copy, or move the call above the spread. One-line fix. Add an assertion to `packages/elysia/test` that `event.sdk.name === 'sentry.javascript.elysia'`.

**Prior art** the identical bug was already found and fixed one package over: [#15458]()/[#15459]() "fix(bun): Includes correct sdk metadata". That PR also added the SDK-metadata assertion to the Bun tests, which is the test to copy here.

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

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

調査の方向性

Start at packages/elysia/src/sdk.ts:44 and inspect how userOptions is copied before applySdkMetadata runs. Make the metadata call target the copied options or move it before the spread, then add the SDK-name assertion in packages/elysia/test, following the assertion added to the Bun tests in #15459. Done means the test sees event.sdk.name as sentry.javascript.elysia.

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

評価

技術スタック
bun, node.js, typescript
領域
backend, testing-qa
issue の種類
バグ
難易度
1/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
92/100

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

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