Skip to content

[exporter/prometheusremotewrite] 5xx errors incorrectly classified as error_permanent="true"#48432

Open
bogdan-st wants to merge 1 commit into
open-telemetry:mainfrom
bogdan-st:prw-error-permanent-classification
Open

[exporter/prometheusremotewrite] 5xx errors incorrectly classified as error_permanent="true"#48432
bogdan-st wants to merge 1 commit into
open-telemetry:mainfrom
bogdan-st:prw-error-permanent-classification

Conversation

@bogdan-st
Copy link
Copy Markdown
Contributor

Description

execute() had an unconditional return consumererror.NewPermanent(err) that overrode the error classification already set by executeFunc, which correctly returns plain errors for 5xx and permanent errors for 4xx. On top of that, handleRequests() wrapped every error from execute() in another consumererror.NewPermanent, unlike handleRequestsV2() which propagates errors as-is. Both cause 5xx responses to appear as error_permanent="true" on otelcol_exporter_send_failed_metric_points_total, making the attribute useless for distinguishing backend failures from data errors.

Link to tracking issue

Fixes #48431

Testing

Added two cases to TestRetries covering execute() directly: 5xx with retry disabled returns a non-permanent error, 4xx still returns permanent.

@bogdan-st bogdan-st force-pushed the prw-error-permanent-classification branch from 43aaf3c to f051a2a Compare May 17, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[exporter/prometheusremotewrite] 5xx errors incorrectly classified as error_permanent="true"

2 participants