JdkHttpSender passes CompletionException instead of the original exception to onError
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- backend, observability
Direzione di ricerca
Inizia da JdkHttpSender.java, intorno alle righe 181–190, dove supplyAsync e whenComplete passano l’errore a onError; confronta questo percorso con la gestione esistente di RejectedExecutionException. Controlla in HttpExporterTest il tipo di errore IOException previsto e riproduci il problema usando il mittente JDK con una connessione rifiutata. Il lavoro è completato quando onError riceve l’eccezione di trasporto originale e l’esportatore ne segnala il tipo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
JdkHttpSender.send() passes a CompletionException wrapping an UncheckedIOException wrapping the real IOException to onError, instead of the original exception. HttpExporter then records error.type=java.util.concurrent.CompletionException for every transport failure, and the wrapper becomes the top-level exception in the SEVERE log and the cause of FailedExportException.
Steps to reproduce
- Use
OtlpHttpSpanExporterwithopentelemetry-exporter-sender-jdkandsetInternalTelemetryVersion(InternalTelemetryVersion.LATEST). - Point it at an endpoint with no listener (connection refused) and export a span.
- Inspect
error.typeonotel.sdk.exporter.span.exported, orFailedExportException.getCause().
What did you expect to see?
The real exception, e.g. java.net.ConnectException, as with OkHttpHttpSender, which passes the IOException from onFailure to onError. HttpExporterTest also expects error.type=java.io.IOException when the sender reports an IOException.
What did you see instead?
java.util.concurrent.CompletionException. supplyAsync wraps the UncheckedIOException thrown at JdkHttpSender.java line 181 in a CompletionException, and whenComplete (line 185-190) forwards it unchanged. The RejectedExecutionException path in the same method already passes the unwrapped exception.
What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-otlp, opentelemetry-exporter-sender-jdk
Version: main @ b32298a83
How did you reference these artifacts? N/A (source build)
Environment
Compiler: Temurin 21
OS: N/A
Additional context
N/A
- Lingua principale
- Java
- Stelle
- 2.5k
- Fork
- 1k
- Merge medio
- 2g 23h
- PR unite (30g)
- 68
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di open-telemetry/opentelemetry-java
-
OkHttpGrpcSender no longer logs retry attemptsForse già presa @thswlsqls l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
open-telemetry/opentelemetry-java#8966 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Fix `otel.sdk.log.created` counting semanticsForse già presa @anuraaga l’ha presa 75 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
open-telemetry/opentelemetry-java#8688 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
open-telemetry/opentelemetry-java#8971 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
open-telemetry/opentelemetry-java#8970 ·
I maintainer di solito rispondono entro 2 giorni
-
OkHttp gRPC sender retries are rejected by a bounded executorForse già presa @thswlsqls l’ha presa 1 giorno fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 61/100
open-telemetry/opentelemetry-java#8964 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di open-telemetry/opentelemetry-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/rocketmq-dashboard#7250 ·
I maintainer di solito rispondono entro 3 giorni
-
HttpMaxFrameSizeTest.sendOversizedMessageTest() passes silently when maxFrameSize is not enforcedAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/activemq#2706 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
federicoiosue/Omni-Notes#1032 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
unitycatalog/unitycatalog#2025 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
krizaka/krizaka-notifications#22 ·
I maintainer di solito rispondono entro 1 giorno