getsentry / getsentry/sentry-javascript
Elysia on Node uses Bun's fetch transport
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 1.8k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 523
Description
`elysia/src/sdk.ts:51` sets `options.transport = makeFetchTransport` from `@sentry/bun`. On Node that replaces `makeNodeTransport`, losing proxy support (`http_proxy`/`HTTPS_PROXY`), custom CA / `NODE_EXTRA_CA_CERTS` handling, and keep-alive agent tuning. Anyone running Elysia on Node behind a corporate proxy loses all events.
**Work item.** Pick the transport by runtime, the way `getRuntime()` already does. This and E2 both stem from `@sentry/elysia` depending only on `@sentry/bun` while advertising Node support; E1 is unrelated to that and would happen just as readily if Elysia wrapped `@sentry/node`. Worth a short design note on whether the dependency should be conditional.
Contributor guide
Research direction
Start at elysia/src/sdk.ts:51 and trace how getRuntime() selects a runtime. Compare the Node and Bun transport choices, then check the existing Node transport behavior for proxy, CA certificate, and keep-alive support. Done means Elysia uses the appropriate transport on Node without regressing Bun, with the dependency/design implications documented as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, nodejs, typescript
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100