-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xds/internal/balancer/outlierdetection: Add Channelz Logger to Outlier Detection LB #6145
xds/internal/balancer/outlierdetection: Add Channelz Logger to Outlier Detection LB #6145
Conversation
1b8d781
to
0aad338
Compare
cc @zasweq |
@zasweq Any updates on this? |
Taking a look now. Sorry for the delay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. Sorry for the late pass. Looks great outside of a few nits.
func (a *addressInfo) string() string { | ||
res := "[" | ||
for _, sw := range a.sws { | ||
res += sw.string() | ||
} | ||
res += "]" | ||
return res | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use a strings.Builder here for efficiency. See #5654, and the second answer here: https://stackoverflow.com/questions/1760757/how-to-efficiently-concatenate-strings-in-go/47798475#47798475.
channelz.Infof(logger, b.channelzParentID, "SuccessRate algorithm detected outlier: %s. "+ | ||
"Parameters: successRate=%f, mean=%f, stddev=%f, requiredSuccessRate=%f", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you get rid of the + and put this on one line please.
This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; @zasweq will follow-up to see if string() should be changed to String()
This PR replicates grpc/grpc-java#9880 from grpc-java, which adds additional logging to the outlierDetection LB to improve observability.
Here are the additional messages that will be logged (taken from my end-to-end test):
And a similar message for the success rate algorithm
And a similar message for the unejection event.
It would be nice to use sub-channel logger, but this would require passing sub-channel channelz ID to the balancer, which is currently not possible and requires changing
SubConn
interface.RELEASE NOTES: