Skip to content

bun: httpIntegration incoming-request options have no effect with @sentry/bun #26609

Closed

Description

@isaacs

With @sentry/bun, the incoming-request options of httpIntegration have no effect on a node:http server, for example Express. This includes maxRequestBodySize: 'none', so the SDK still sends request bodies when the user turned body capture off.

import * as Sentry from '@sentry/bun';

Sentry.init({
  dsn: '...',
  tracesSampleRate: 1.0,
  integrations: [Sentry.httpIntegration({ maxRequestBodySize: 'none' })],
});
// An Express app on `node:http` still gets `http.request.body.data` on its `http.server` spans.

Cause

Bun does not publish http.server.request.start, so httpIntegration creates no http.server spans on Bun. bunHttpServerIntegration creates them instead, and it reads its own maxRequestBodySize and ignoreRequestBody options. @sentry/bun re-exports httpIntegration from @sentry/node, so the options type-check but do nothing for incoming requests.

Expected

The incoming-request options that a user passes to httpIntegration apply on Bun too. One way: bunHttpServerIntegration reads the incoming-request options of the Http integration when the user sets them. Another: @sentry/bun warns when they are set on httpIntegration.

Reproduction

The Node suites suites/express/with-http/maxIncomingRequestBodySize and suites/express/tracing/request-data (the "ignores request data" case) fail under @sentry/bun, in the node-suites-bun-run project of dev-packages/bun-integration-tests. The suites in HTTP_SERVER_OPTIONS_IGNORED in dev-packages/bun-integration-tests/node-suites/excludes.ts fail for the same reason in the node-suites-sentry-bun project.

Activity

  1. linear-code commented on Nov 18, 2026

    @linear-code
  2. self-assigned this
    on Nov 18, 2026
  3. added a commit that references this issue on Nov 19, 2026
    08b0433
  4. github-actions commented on Nov 20, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #26611, which was included in the 11.16.0 release.

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions