Skip to content

@sentry/nextjs on Bun: Next.js telemetry requests in next dev create root http.client spans #26931

In progress

Description

@JPeer264

Description

With bun --bun next dev, the requests that Next.js sends for its telemetry and its version check create root http.client spans:

  • POST https://telemetry.nextjs.org/api/v1/record
  • GET registry.npmjs.org

These spans have no parent span, and they join the trace of load instrumentation module. With next dev on Node.js, the same app sends no spans for these requests. next start on Bun does not send them, as Next.js sends this telemetry only in dev.

Steps to reproduce

  1. Set up a Next.js 16 app with @sentry/nextjs and @sentry/bun (instrumentation.ts, withSentryConfig, tracesSampleRate: 1.0).
  2. Run bun --bun next dev.
  3. Open the trace of load instrumentation module.

Expected result

The same as on Node.js: no spans for Next.js-internal requests that are not part of a request.

Actual result

Bun:

trace-bun-next-dev

Node.js:

trace-node-next-dev

Tested with @sentry/nextjs from develop (9bba64d, with #26923), Next.js 16.4.6, Bun 1.4.5 and Node.js 22.23.1. With the released 11.18.0, next dev on Bun usually crashes at startup (#26911), so this problem shows only after that fix is released.

Activity

  1. linear-code commented on Nov 26, 2026

    @linear-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions