Skip to content

Conversation

@vinodhabib
Copy link
Contributor

@vinodhabib vinodhabib commented Feb 21, 2025

core: added changes to make service config more explicit by logging required details of transported JSON

Fixes: #5758

@vinodhabib vinodhabib marked this pull request as ready for review February 25, 2025 07:18
@shivaspeaks shivaspeaks added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Feb 26, 2025
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Feb 26, 2025
InternalConfigSelector prevConfig = configSelector.get();
configSelector.set(config);
configSelector.set(newConfig);
channelLogger.log(ChannelLogLevel.INFO,
Copy link
Member

@shivaspeaks shivaspeaks Mar 3, 2025

Choose a reason for hiding this comment

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

This could be right but this can also lead to spamming as config update can happen per RPC.

Perhaps we should discuss/ rethink on the requirement for this logging. Or maybe it will be better if we log only when default config is applied and expected retry config is not applied when retry is enabled and service config is present. And we also need to figure out how it will help the user, about why the given config was not applied! Logging that will be much better.

Copy link
Member

Choose a reason for hiding this comment

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

gRPC does not log at a default-enabled log level (java.util.logging INFO or higher), unless SEVERE and there's no other way to handle it. However, here you're using the channel logger, which uses FINER java.util.logging level.

In general, I don't think typical logging is appropriate for this issue. (We can have some debug logging, but it'd be mostly for us; users would be unlikely to see it.) I think it'd be best to expose the current service config to channelz, although when I mentioned it to other TLs in the past it didn't gain traction. This "channel logger" does dump things in channelz when configured to do so, and then you can use grpcdebug to see the logs. Not the easiest, but could work. Importantly, we wouldn't want to log when the config is unchanged.

But overall, I think this issue needs a design before an implementation.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should discuss/ rethink on the requirement for this logging.

There was no such requirement of logging specifically.

@ejona86 ejona86 removed their request for review March 18, 2025 15:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make service config more explicit

5 participants