[connector/failover] Better handling logic for no healthy pipelines#47211
Open
singhvibhanshu wants to merge 2 commits intoopen-telemetry:mainfrom
Open
[connector/failover] Better handling logic for no healthy pipelines#47211singhvibhanshu wants to merge 2 commits intoopen-telemetry:mainfrom
singhvibhanshu wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
jmacd
approved these changes
Mar 27, 2026
| } | ||
|
|
||
| if err := tc.ConsumeLogs(ctx, ld); err != nil { | ||
| if idx > 0 && idx == len(f.cfg.PipelinePriority)-1 { |
Contributor
There was a problem hiding this comment.
What's the idx > 0 test do for us? I take it we want to try at least once even when all servers are unhealthy?
Contributor
Author
There was a problem hiding this comment.
i just thought if a user configure the failover connector with just only a single pipeline therefore added idx > 0 just to prevent unnecessary fn call
and yes we want to try one last time even when all servers are unhealthy
Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
Contributor
Author
|
Hi there! |
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.
Resolves #46820
Description:
If each pipeline in the failover priorities reports an error, the connector gets stuck until the retry interval allows it to re-attempt a prior exporter. This can result in the collector dropping data for a significant amount of time, even if a higher-priority pipeline has already recovered.
This PR introduces a logic to
consumeByHealthyPipelinefor all three signals (Traces, Metrics, Logs). When the last priority pipeline returns an error, the connector will now attempt one immediate loop at retrying the unhealthy consumers. If a prior consumer has recovered, the data is successfully exported and the stable index is reset, preventing unnecessary data loss.