Skip to content

http integration: sentry adds the same header many times: 'The number of request header fields exceeds this server's limit' #8654

@Andrei-Stepanov

Description

@Andrei-Stepanov

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

7.60.0

Framework Version

No response

Link to Sentry event

https://red-hat-it.sentry.io/issues/4323333831/?project=4505158884196352&query=is%3Aunresolved&referrer=issue-stream&stream_index=0

SDK Setup

https://github.com/fedora-ci/ciboard-server/blob/29be9f40dca07d8cc393d81704442c592eaa0e5e/src/server.ts#L59

Sentry.init({
  integrations: [
    // Enable HTTP calls tracing.
    new Sentry.Integrations.Http({ tracing: true }),
    // Enable Express.js middleware tracing.
    new Sentry.Integrations.Express({ app }),
    // Automatically instrument Node.js libraries and frameworks.
    ...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(),
  ],
  release: process.env.CIBOARD_SERVER_GIT_COMMIT || 'custom-build',
})

Steps to Reproduce

Bug is in:

https://docs.sentry.io/platforms/node/configuration/integrations/default-integrations/#http

Start sending HTTPS requests.

Sentry adds tons HTTP-headers.

Expected Result

Sentry do not spoil http traffic with duplicated entries of the same header.

Actual Result

Sentry adds the same header tons of times:

req headers: POST /brewhub HTTP/1.1
useragent: ciboard-server
User-Agent: NodeJS XML-RPC Client
Content-Type: text/xml
Accept: text/xml
Accept-Charset: UTF8
Connection: Keep-Alive
Content-Length: 324
sentry-trace: dfda641419e54f7f954ae2208f6d2c91-8754a115bfefa680-0
baggage: sentry-environment=production,sentry-release=756212cc5e502f60527c45f2213a0eb34e13fa04,sentry-public_key=86cf439ffd454a21bec26faae0da9962,sentry-trace_id=ca1d026ad267460297f064fda63470c9
baggage: sentry-environment=production,sentry-release=756212cc5e502f60527c45f2213a0eb34e13fa04,sentry-public_key=86cf439ffd454a21bec26faae0da9962,sentry-trace_id=ca1d026ad267460297f064fda63470c9
baggage: sentry-environment=production,sentry-release=756212cc5e502f60527c45f2213a0eb34e13fa04,sentry-public_key=86cf439ffd454a21bec26faae0da9962,sentry-trace_id=ca1d026ad267460297f064fda63470c9
baggage: sentry-environment=production,sentry-release=756212cc5e502f60527c45f2213a0eb34e13fa04,sentry-public_key=86cf439ffd454a21bec26faae0da9962,sentry-trace_id=ca1d026ad267460297f064fda63470c9

Metadata

Metadata

Assignees

Labels

Package: nodeIssues related to the Sentry Node SDK

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions