hono: Double `init()` behaves differently per runtime
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 76/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- bun, deno, nodejs, typescript
- 領域
- backend, observability
研究方向
從 hono/src/node/sdk.ts:15 開始,將其與 hono/src/bun/sdk.ts:17 和 hono/src/deno/sdk.ts:17 進行比較,然後找出第四個 runtime 項目。檢查全部四個項目中的初始化和警告行為。完成的標準是每個 runtime 在第二次 init 時發出警告,同時保留並回傳現有 client,而不是將其替換。
由索引模型根據 Issue 內容生成。
描述
node : same client after 2nd init? true | release now: 1.0.0
bun : same client after 2nd init? false | release now: 2.0.0
(plus a console warning)
hono/src/node/sdk.ts:15 returns the existing client and skips re-initialization. hono/src/bun/sdk.ts:17 and hono/src/deno/sdk.ts:17 warn and then re-initialize anyway, replacing the client. Anything buffered on the first client is dropped, and its integrations stay installed against a dead client.
The Hono docs tell users to init through the sentry() middleware, so a user who also calls Sentry.init() hits exactly this path.
Work item. Make all four entries behave the same way. Returning the existing client (the Node behavior) is the safer default. Keep the loud warning from bun/deno on all of them.
**Prior art **#21176 asked for the Bun middleware to follow the Node pattern. getsentry/sentry-javascript#21195 closed it by adding the warning only. The behavior divergence this item describes is what is left over: bun and deno warn and then re-initialize anyway.
- 主要語言
- TypeScript
- 星號
- 8.7k
- 分支
- 1.9k
- 平均合併
- 1 天 16 小時
- 30 天內合併 PR
- 576
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getsentry/sentry-javascript 的其他 Issue
-
Browser Bug Next.js Traces Waiting for: Product Owner
難度 2/5 1-3 小時 新手友好度 75/100
getsentry/sentry-javascript#24672 · 1 則留言 ·
-
javascript
難度 2/5 1-3 小時 新手友好度 75/100
getsentry/sentry-javascript#24200 · 2 則留言 ·
-
javascript Task
難度 2/5 1-3 小時 新手友好度 82/100
getsentry/sentry-javascript#24134 · 1 則留言 ·
-
Cloudflare Workers javascript Tests
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-javascript#24051 · 1 則留言 ·
-
Bug Bun javascript
難度 2/5 1-3 小時 新手友好度 92/100
getsentry/sentry-javascript#24045 · 1 則留言 ·
查看 getsentry/sentry-javascript 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
bcgov/bc-wallet-mobile#4761 · 1 則留言 ·
-
external-issue to-triage
難度 2/5 1-3 小時 新手友好度 88/100
-
area-deployment area-integrations triage:bot-seen
難度 2/5 半天 新手友好度 86/100
-
難度 2/5 1-3 小時 新手友好度 82/100
-
refactor
難度 2/5 1-3 小時 新手友好度 84/100