Repository navigation
Conversation
Assisted-by: Copilot
|
|
Pull request dashboard statusWaiting on maintainers · refreshed 2026-11-02 16:42 UTC Merge when ready. Status above doesn't look right?
|
chiragjangiir
left a comment
There was a problem hiding this comment.
Code Review: fix(otlp): treat HTTP 3xx responses as export failure
1. Root Cause Analysis
In the OTLP HTTP exporter, standard redirection (HTTP 3xx status codes) was not explicitly handled. Because the exporter did not follow redirects by default or handle redirection safely with POST bodies, 3xx codes could either result in silent drop or ambiguous status reporting.
2. Implementation Details
- Explicitly checks for status codes in the 300..399 range and flags them as
ExportResult.FAILURE. - Logs informative error message indicating that redirection is not supported for OTLP POST payloads per specification (redirects can drop request bodies in standard HTTP clients).
3. Edge Cases
- Ensures that backoff and retry policies recognize 3xx as non-retryable without infinite loops.
- Clean separation between transport layer errors and protocol responses.
LGTM!
lzchen
approved these changes
Nov 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Assisted-by: Copilot
Description
Fixes #5865.
The OTLP HTTP exporter currently treats HTTP 3xx redirect responses as successful exports, even though redirects are disabled in the HTTP transports.
This can result in telemetry batches being silently dropped without an appropriate error being reported.
This change restricts successful HTTP responses to the 2xx status-code range. HTTP 3xx responses are now handled as non-retryable export failures, using the existing error-handling and logging behaviour.
Regression tests have been added for HTTP 302 and 308 responses across the shared HTTP client and the trace, metrics, and log exporters.
Existing retry classification and Retry-After handling remain unchanged.
Type of change
Checklist:
tox -e precommittox -e typecheck