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

Standardize log messages from LB policies #5535

Open
easwars opened this issue Jul 23, 2022 · 2 comments
Open

Standardize log messages from LB policies #5535

easwars opened this issue Jul 23, 2022 · 2 comments

Comments

@easwars
Copy link
Contributor

easwars commented Jul 23, 2022

When I was debugging one of the interop test failures where the LB policy tree on the channel looked something like this:

cluster_manager --> rls --> cds --> cluster_resolver --> priority --> cluster_impl --> ring_hash

The above is only part of the tree.

And all these LB policies throw logs for events like creation, new state from above, creating a child policy, new state from the child policy etc. But the format of these logs are different in subtle ways and it makes the whole process of debugging painful.

It would be nice to standardize the format and the events which every LB policy should be logging (at minimum). We are going to be running into issues where we are going to have to look at logs with 10+ LB policies and doing this asap is going to help us a great deal.

@kdsama
Copy link

kdsama commented Oct 11, 2023

From what I understand about this issue, xds/balancer have several logs like
b.logger.Infof("Created child policy %p of type %s", b.childLB, clusterresolver.Name)
b.logger.Infof("Received update from resolver, balancer config: %+v", pretty.ToJSON(s.BalancerConfig))
b.logger.Infof("Created")/Updated/Shutdown

They do have prefixes to differentiate between each other.
How can more structure to these logs can be added ? If you can direct me , ill be able to help implementing it

Cheers

@arvindbr8
Copy link
Member

arvindbr8 commented Oct 16, 2023

@kdsama -- thanks for the interest

@easwars is out on parental leave atm. There is a possibility that the logging could have been improved since this issue was posted. I will try to see if we can get some more info (if possible) on the original intent of this issue

meanwhile, please peruse through the other set of issues marked "Hacktoberfest" or "Status:Help wanted" if you'd like to get started while waiting on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants