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

Log ORCA UNIMPLEMENTED error to subchannel logger #10625

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

yannickepstein
Copy link
Contributor

@yannickepstein yannickepstein commented Oct 24, 2023

We started using Orca, but not every service in our service mesh serves an Orca endpoint.
This means that our client side logs filled up with severe logging messages about the Orca service being UNIMPLEMENTED per subchannel.
This is because the error is the only one that is logged to a static Java logger instance, while the rest of the subchannel messages are logged to the SubchannelLogger.

In order to not fill up the logs of our services, we'd like to also log the UNIMPLEMENTED error to the SubchannelLogger.

Logging to the static instance would result in application logs filling
up if the Orca service is not available.
We'd like to have the logging on the subchannelLogger, so we make it
visible on demand.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 24, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Using contains over containsExactly seems more reasonable.
@@ -153,7 +153,7 @@ private static OrcaLoadReportRequest buildOrcaRequestFromConfig(
}

private static void assertLog(List<String> logs, String expectedLog) {
assertThat(logs).containsExactly(expectedLog);
assertThat(logs).contains(expectedLog);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be a questionable change, but I think this is the better way to test if a log message is present. However, I can rework this if needed.

@ejona86 ejona86 requested a review from YifeiZhuang October 25, 2023 15:58
@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Oct 25, 2023
@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 Oct 25, 2023
Copy link
Member

@YifeiZhuang YifeiZhuang left a comment

Choose a reason for hiding this comment

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

LGTM

@ejona86 ejona86 merged commit 86835ae into grpc:master Oct 25, 2023
@ejona86
Copy link
Member

ejona86 commented Oct 25, 2023

Thank you!

@yannickepstein yannickepstein deleted the orca-subchannel-logging branch October 26, 2023 06:10
ejona86 pushed a commit to ejona86/grpc-java that referenced this pull request Oct 26, 2023
Logging to the static instance would result in application logs filling
up if the Orca service is not available.
We'd like to have the logging on the subchannelLogger, so we make it
visible on demand.

Also succeed Orca logging test if log message present. Using
contains over containsExactly seems more reasonable.
YifeiZhuang pushed a commit that referenced this pull request Oct 26, 2023
Logging to the static instance would result in application logs filling
up if the Orca service is not available.
We'd like to have the logging on the subchannelLogger, so we make it
visible on demand.

Also succeed Orca logging test if log message present. Using
contains over containsExactly seems more reasonable.

Co-authored-by: Yannick Epstein <yannick.epstein@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2024
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.

None yet

4 participants