OTLP HTTP exporter reports a 3xx response as a successful export, so redirected batches are dropped without any log
I maintainer di solito rispondono entro 2 giorni
@d4rshnn ci sta già lavorando.
Dal 31/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- observability
Direzione di ricerca
Inizia dalla logica condivisa dell’exporter in exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/http.py, in particolare dalle righe collegate nell’issue. Controlla i test esistenti per la gestione dello stato dell’esportazione HTTP, quindi verifica che una risposta 3xx produca SpanExportResult.FAILURE e un log di errore, mentre le risposte riuscite continuino a essere considerate riuscite.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe your environment
OS: macOS (Darwin 25.5.0)
Python version: 3.14.6
SDK version: 1.45.1 (opentelemetry-exporter-otlp-proto-http 1.45.1, opentelemetry-exporter-otlp-common 0.66b1, opentelemetry-exporter-http-transport 0.66b1)
API version: 1.45.1
What happened?
Redirections are not followed and are not logged as error. It makes the batches silently dropped.
Both HTTP transports turn off redirects since #5194.
The shared exporter code still counts any status from 200 to 399 as success. So a 308 comes back as SpanExportResult.SUCCESS, nothing is logged and the batch is lost.
Steps to Reproduce
The following code runs a server that always redirects and tries to export to that server. The export is successful.
import logging
import threading
from http.server import BaseHTTPRequestHandler, HTTPServer
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace import TracerProvider
logging.basicConfig(level=logging.DEBUG)
class AlwaysRedirect(BaseHTTPRequestHandler):
def do_POST(self):
self.rfile.read(int(self.headers["Content-Length"]))
self.send_response(308)
self.send_header("Location", "/elsewhere/v1/traces")
self.send_header("Content-Length", "0")
self.end_headers()
server = HTTPServer(("127.0.0.1", 0), AlwaysRedirect)
threading.Thread(target=server.serve_forever, daemon=True).start()
span = TracerProvider().get_tracer("repro").start_span("span")
span.end()
exporter = OTLPSpanExporter(endpoint=f"http://127.0.0.1:{server.server_port}/v1/traces")
print("export result:", exporter.export([span]))
Expected Result
The export is reported as failed (SpanExportResult.FAILURE) with an error log.
Actual Result
The export is successful but nothing is really exported and batches are lost.
Additional context
No response
Would you like to implement a fix?
No response
Tip
No response
- Lingua principale
- Python
- Stelle
- 2.7k
- Fork
- 1.1k
- Merge medio
- 4g 13m
- PR unite (30g)
- 38
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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-python
-
opentelemetry-configuration: OTLP HTTP exporter does not validate TLS files exist at startupForse già presa @Dotify71 l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open-telemetry/opentelemetry-python#5928 ·
I maintainer di solito rispondono entro 2 giorni
-
W3CBaggagePropagator drops a list-member over 4096 bytes that W3C Baggage requires it to propagateForse già presa @codedbyadiiii l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
open-telemetry/opentelemetry-python#5913 ·
I maintainer di solito rispondono entro 2 giorni
-
otel.sdk.processor.{span,log}.queue.capacity uses synchronous UpDownCounter recorded once in __init__Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open-telemetry/opentelemetry-python#5891 ·
I maintainer di solito rispondono entro 2 giorni
-
Prometheus map_unit incorrectly normalizes percent ratio units such as %/sForse già presa @knowprasad l’ha presa 10 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
open-telemetry/opentelemetry-python#5875 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
open-telemetry/opentelemetry-python#5700 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di open-telemetry/opentelemetry-python
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
docling-project/docling-pipelines#669 ·
I maintainer di solito rispondono entro 1 giorno
-
blocked kind/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opendatahub-io/agent-eval-harness#329 · 2 commenti · 1 reazione ·
-
cc_wrapper crashes with ValueError on Windows when a path is on another driveForse già presa @TrapsterDK l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
tweag/rules_haskell#2492 ·
I maintainer di solito rispondono entro 1 giorno