OTLP HTTP exporter reports a 3xx response as a successful export, so redirected batches are dropped without any log
Mantenedores costumam responder em até 2 dias
@d4rshnn já está trabalhando nisso.
Desde 31/10/2026.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 72/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- python
- Domínio
- observability
Direção de pesquisa
Comece pela lógica compartilhada do exporter em exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/http.py, especialmente pelas linhas vinculadas na issue. Confira os testes existentes para o tratamento do status de exportação HTTP e, em seguida, verifique se uma resposta 3xx produz SpanExportResult.FAILURE e um log de erro, enquanto as respostas bem-sucedidas continuam sendo bem-sucedidas.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 2.7k
- Forks
- 1.1k
- Merge médio
- 4d 13min
- PRs com merge (30d)
- 38
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de open-telemetry/opentelemetry-python
-
opentelemetry-configuration: OTLP HTTP exporter does not validate TLS files exist at startupTalvez já em andamento @Dotify71 assumiu há 5 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
open-telemetry/opentelemetry-python#5928 ·
Mantenedores costumam responder em até 2 dias
-
W3CBaggagePropagator drops a list-member over 4096 bytes that W3C Baggage requires it to propagateTalvez já em andamento @codedbyadiiii assumiu há 8 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
open-telemetry/opentelemetry-python#5913 ·
Mantenedores costumam responder em até 2 dias
-
otel.sdk.processor.{span,log}.queue.capacity uses synchronous UpDownCounter recorded once in __init__Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
open-telemetry/opentelemetry-python#5891 ·
Mantenedores costumam responder em até 2 dias
-
Prometheus map_unit incorrectly normalizes percent ratio units such as %/sTalvez já em andamento @knowprasad assumiu há 10 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
open-telemetry/opentelemetry-python#5875 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 70/100
open-telemetry/opentelemetry-python#5700 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
Todas as issues de open-telemetry/opentelemetry-python
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Deltares/numba_celltree#100 · 1 comentário ·
-
auto-reported bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
Mantenedores costumam responder em até 1 dia
-
soup airgap-bundle --bundle-size-cap nan, inf or a cap above ~1.67e299 GiB stops with an internal ValueError/OverflowError (exit 1) instead of a usage errorTalvez já em andamento @Keshemir assumiu hoje. Abertabug claimed difficulty:2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
MakazhanAlpamys/Soup#3045 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
dagster-io/skills#80 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia