getsentry / getsentry/sentry-javascript
bun: `Bun.serve` spans lack client address and protocol attributes
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 1.8k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 515
Description
Deno sets `client.address`, `client.port` (honoring `x-forwarded-for`) and `network.protocol.name`. Bun sets none. Bun exposes the peer through `server.requestIP(request)`.
**Work item.** Thread the `Server` instance into `wrapRequestHandler` and set the three attributes, gated on `dataCollection.userInfo` the way Deno does.
Contributor guide
Research direction
Start at Bun.serve's wrapRequestHandler and compare the existing Deno implementation for client address, port, and network protocol attributes. Inspect Server.requestIP(request) and dataCollection.userInfo, then verify that the three attributes are present only under the same gate used by Deno.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, typescript
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100