feat/backpressure with retryable codes #40509
Open
+175
−23
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.
Description
Change the Exporter returns codes so it provides proper information to the OTEL Pipeline.
In this case, it provides backpressure information for retryable codes.
I have followed the conventions from https://opentelemetry.io/docs/specs/otlp/#failures-1
With the exception of making ALL 5xx retryable, since the same logic is applied for current built-in retry mechanism of the exporter.
Why this change?
In some scenarios in the OTEL Config pipelines, we run the
prometheusremotewriteexporter
in a "failfast" configuration.This means the exporter tries to deliver, and if it fails, it moves on immediately.
However, in certain scenarios, id like for this "exit code" to be propagated back to the original client. This behaviour is natively implemented in OTLP Exporters.
Currently: ANY error is always cataloged as permanent error to the OTEL pipeline.
Now: Most OTLP Compliant codes + ALL 5xx are catalog as retryable, allowing the error to due backpressure to the OTEL pipeline and allowing final error to report back to the upstream.
P.S: Unsure if this is considered a breaking change?
Cheers,
Example of fail fast configuration
Link to tracking issue
N/A
Testing
Unit tests, and some local testing.
Documentation
TBD