Skip to content

Impossible to configure keep-alive in Sentry-Java #4352

Open
@mjet-plane

Description

@mjet-plane

Problem Statement

In Sentry-Java, it doesn’t seem possible to configure HTTP keep-alive. When the SDK sends data to the collector, it explicitly sets the Connection: close header (source).

Because of this forced behavior, the SDK establishes a new connection for every request, which could introduce unnecessary overhead under high load.

Is there a specific reason why keep alive is disabled? The code that disables it seems to be written at least four years ago.

Other Sentry SDKs — like the one for Python — provide options to enable keep-alive (docs).

Solution Brainstorm

  • Introduce keep alive option to Sentry-java.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Needs Discussion

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions