getsentry / getsentry/sentry-javascript

Elysia on Node uses Bun's fetch transport

Open
#24,048 1 comment 0 reactions 0 assignees View on GitHub
Bug Bun javascript
Dominant language
TypeScript
Stars
8.7k
Forks
1.8k
Avg merge
1d 17h
Merged PRs (30d)
515

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.