getsentry / getsentry/sentry-java

Impossible to configure keep-alive in Sentry-Java

Offen
#4,352 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Feature Java
Vorherrschende Sprache
Kotlin
Sterne
1.4k
Forks
478
Ø Merge
2 T. 23 Std.
Gemergte PRs (30 T.)
67

Beschreibung

### 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](https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/transport/HttpConnection.java#L133)).

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](https://docs.sentry.io/platforms/python/configuration/options/#keep_alive)).

### Solution Brainstorm

- Introduce keep alive option to Sentry-java.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.