Skip to content

[connector/failover] Better handling logic for no healthy pipelines#47211

Open
singhvibhanshu wants to merge 2 commits intoopen-telemetry:mainfrom
singhvibhanshu:fix/retryInterval
Open

[connector/failover] Better handling logic for no healthy pipelines#47211
singhvibhanshu wants to merge 2 commits intoopen-telemetry:mainfrom
singhvibhanshu:fix/retryInterval

Conversation

@singhvibhanshu
Copy link
Copy Markdown
Contributor

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 consumeByHealthyPipeline for 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.

Signed-off-by: singhvibhanshu <singhvibhanshu@hotmail.com>
}

if err := tc.ConsumeLogs(ctx, ld); err != nil {
if idx > 0 && idx == len(f.cfg.PipelinePriority)-1 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@singhvibhanshu
Copy link
Copy Markdown
Contributor Author

Hi there!
Kindly have a look at this.
Thanks!

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.

[connector/failoverconnector] better handling for no healthy pipelines

3 participants