getsentry / getsentry/sentry-javascript

bun: `Bun.serve` has no `ignoreStatusCodes`

Open
#23,885 1 comment 0 reactions 0 assignees View on GitHub
Bun Improvement javascript
Dominant language
TypeScript
Stars
8.7k
Forks
1.8k
Avg merge
1d 17h
Merged PRs (30d)
523

Description

`denoServeIntegration` exposes `ignoreStatusCodes` and runs `processHttpServerTransactionEvent`; `httpServerSpansIntegration` does the same on Node. `bunServerIntegration` has no options at all, so 301/302/401/404 transactions are all recorded on Bun.

**Work item.** Add `ignoreStatusCodes` to `bunServerIntegration`, defaulting to `DEFAULT_IGNORE_STATUS_CODES`, and add the `processEvent` hook.

**Prior art ***(related history only)*. No issue for Bun. The Deno equivalents shipped as getsentry/sentry-javascript#23313 and getsentry/sentry-javascript#23692 (both merged), which aligned `denoHttpIntegration` options with `httpIntegration`. Bun was not part of either.

Contributor guide

Open the contributing guide

Research direction

Start at bunServerIntegration and compare its options and transaction handling with denoServeIntegration and httpServerSpansIntegration. Trace DEFAULT_IGNORE_STATUS_CODES and the processEvent hook, then verify that Bun supports configuring ignored status codes and no longer records the specified status-code transactions by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, typescript
Domain
backend, observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.