OTLP HTTP exporter reports a 3xx response as a successful export, so redirected batches are dropped without any log
Maintainers usually reply within 2 days
@d4rshnn is already working on this.
Since Oct 31, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- observability
Research direction
Start with the shared exporter logic in exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/http.py, especially the lines linked in the issue. Check the existing tests for HTTP export status handling, then verify that a 3xx response produces SpanExportResult.FAILURE and an error log while successful responses remain successful.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 2.7k
- Forks
- 1.1k
- Avg merge
- 4d 13m
- Merged PRs (30d)
- 38
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-telemetry/opentelemetry-python
-
opentelemetry-configuration: OTLP HTTP exporter does not validate TLS files exist at startupPossibly taken @Dotify71 claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open-telemetry/opentelemetry-python#5928 ·
Maintainers usually reply within 2 days
-
W3CBaggagePropagator drops a list-member over 4096 bytes that W3C Baggage requires it to propagatePossibly taken @codedbyadiiii claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-python#5913 ·
Maintainers usually reply within 2 days
-
otel.sdk.processor.{span,log}.queue.capacity uses synchronous UpDownCounter recorded once in __init__May be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open-telemetry/opentelemetry-python#5891 ·
Maintainers usually reply within 2 days
-
Prometheus map_unit incorrectly normalizes percent ratio units such as %/sPossibly taken @knowprasad claimed this 10 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
open-telemetry/opentelemetry-python#5875 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
open-telemetry/opentelemetry-python#5700 · 1 comment ·
Maintainers usually reply within 2 days
All issues in open-telemetry/opentelemetry-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docling-project/docling-pipelines#669 ·
Maintainers usually reply within 1 day
-
blocked kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opendatahub-io/agent-eval-harness#329 · 2 comments · 1 reaction ·
-
cc_wrapper crashes with ValueError on Windows when a path is on another drivePossibly taken @TrapsterDK claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
tweag/rules_haskell#2492 ·
Maintainers usually reply within 1 day