Skip to content

Comments

test(nextjs): Add bun e2e test app#19318

Merged
chargome merged 2 commits intodevelopfrom
cg-next-bun-e2e
Feb 13, 2026
Merged

test(nextjs): Add bun e2e test app#19318
chargome merged 2 commits intodevelopfrom
cg-next-bun-e2e

Conversation

@chargome
Copy link
Member

@chargome chargome commented Feb 13, 2026

  • Adds a new E2E test application (nextjs-16-bun) that runs Next.js 16 on Bun's runtime via bun --bun next build/start
  • Update CI to pick up this test for the bun runtime

Some limitations we ran into:

1. Outgoing fetch trace propagation is broken

sentry-trace and baggage headers are not attached to outgoing fetch() requests. The OTel nativeNodeFetchIntegration does not intercept Bun's native fetch implementation, so distributed tracing across services does not work. The inbound request starts a new trace instead of continuing the caller's trace.

2. HTTP request headers not extracted as span attributes

Inbound HTTP request headers (e.g. User-Agent, custom headers) are not populated as http.request.header.* attributes on server spans. The OTel HTTP instrumentation doesn't extract these when running on Bun.

Will create tickets for the findings.

ref https://linear.app/getsentry/issue/FE-713/investigate-nextjsbun-setup

@chargome chargome self-assigned this Feb 13, 2026
@linear
Copy link

linear bot commented Feb 13, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Codecov Results 📊


Generated by Codecov Action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,101 - 9,125 -0%
GET With Sentry 1,684 19% 1,602 +5%
GET With Sentry (error only) 6,171 68% 5,883 +5%
POST Baseline 1,179 - 1,176 +0%
POST With Sentry 591 50% 561 +5%
POST With Sentry (error only) 1,015 86% 1,019 -0%
MYSQL Baseline 3,278 - 3,170 +3%
MYSQL With Sentry 469 14% 434 +8%
MYSQL With Sentry (error only) 2,677 82% 2,594 +3%

View base workflow run

@chargome chargome changed the title text(nextjs): Add bun e2e test app test(nextjs): Add bun e2e test app Feb 13, 2026
@chargome chargome requested review from isaacs and logaretm February 13, 2026 11:32
@chargome chargome enabled auto-merge (squash) February 13, 2026 12:52
@chargome chargome requested a review from s1gr1d February 13, 2026 12:55
import * as Sentry from '@sentry/nextjs';

export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: is this still nodejs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still node yes

@chargome chargome merged commit fb52cd2 into develop Feb 13, 2026
70 checks passed
@chargome chargome deleted the cg-next-bun-e2e branch February 13, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants