Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RoundRobinLoadBalancer: further logging enhancements #1870

Merged
merged 3 commits into from
Oct 8, 2021

Conversation

idelpivnitskiy
Copy link
Member

@idelpivnitskiy idelpivnitskiy commented Oct 8, 2021

Motivation:

There are still a few gaps in RRLB logging.

Modifications:

  • Add a counter for targetResource to distinguish different clients
    for the same target host;
  • Enhance RoundRobinLoadBalancer#toString() to include all hosts;
  • Use consistent "Load balancer for" pattern for all log events;
  • Avoid double logging when health check passes (it also logs that it
    cancelled);
  • Log the full host state when health check is cancelled to let us
    know its new state;
  • Log connection id if we close a new connection when health check
    finishes;
  • Log if the health check terminated with an unexpected error;
  • Fix order of log arguments when we observe connect failure;

Result:

Better visibility into RRLB execution.

Motivation:

There are still a new gaps in RRLB logging.

Modifications:

- Add a counter for `targetResource` to distinguish different clients
for the same target host;
- Enhance `RoundRobinLoadBalancer#toString()` to include all hosts;
- Use consistent "Load balancer for" pattern for all log events;
- Avoid double logging when health check passes (it also logs that it
cancelled);
- Log the full `host` state when health check is cancelled to let us
know its new state;
- Log connection id if we close a new connection when health check
finishes;
- Log if the health check terminated with an unexpected error;

Result:

Better visibility into RRLB execution.
@idelpivnitskiy idelpivnitskiy merged commit f9558ef into apple:main Oct 8, 2021
@idelpivnitskiy idelpivnitskiy deleted the rrlb-more-logs branch October 8, 2021 15:32
idelpivnitskiy added a commit that referenced this pull request Oct 8, 2021
Motivation:

There are still a few gaps in RRLB logging.

Modifications:

- Add a counter for `targetResource` to distinguish different clients
for the same target host;
- Enhance `RoundRobinLoadBalancer#toString()` to include all hosts;
- Use consistent "Load balancer for" pattern for all log events;
- Avoid double logging when health check passes (it also logs that it
cancelled);
- Log the full `host` state when health check is cancelled to let us
know its new state;
- Log connection id if we close a new connection when health check
finishes;
- Log if the health check terminated with an unexpected error;
- Fix order of log arguments when we observe connect failure;

Result:

Better visibility into RRLB execution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants