Skip to content

Enable debug logging add recommendation #948

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

Merged
merged 7 commits into from
Feb 1, 2022

Conversation

YunchuWang
Copy link
Member

Description

Fixes #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

Copy link
Member

@vrdmr vrdmr left a comment

Choose a reason for hiding this comment

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

nit changes requested.

You missed another comment from @gavin-aguiar - #943 (review). Could you please address that in here?

@@ -459,6 +461,7 @@ async def _handle__function_environment_reload_request(self, req):
try:
logger.info('Received FunctionEnvironmentReloadRequest, '
'request ID: %s', self.request_id)
enable_debug_logging_recommendation()
Copy link
Contributor

Choose a reason for hiding this comment

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

@vrdmr Should we pass this along with the above 'Received FunctionEnvironmentReloadRequest' log, so we have only one grpc call here? Same with the worker init request

Copy link
Member

Choose a reason for hiding this comment

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

During the init, it won't matter much as grpc overhead for only one call is very low. It is when that call is repeated multiple times, then it'll start hampering us.

Also, as this is something that we are expecting customers to observe and take action if necessary, I think we shouldn't mix it with the other logs.

I would recommend keeping as it is.

Copy link
Member

@vrdmr vrdmr left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for adding this log.

nit - please make the one minor change in the review..

from .logging import disable_console_logging, enable_console_logging
from .logging import enable_debug_logging_recommendation
from .logging import (logger, error_logger, is_system_log_category,
CONSOLE_LOG_PREFIX)
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we merge these three imports into one?

@YunchuWang YunchuWang merged commit 3755e68 into dev Feb 1, 2022
@YunchuWang YunchuWang deleted the wangbill/enable-debug-logging-add-recommendation branch February 1, 2022 15:38
@YunchuWang YunchuWang restored the wangbill/enable-debug-logging-add-recommendation branch February 1, 2022 15:38
@YunchuWang YunchuWang deleted the wangbill/enable-debug-logging-add-recommendation branch February 1, 2022 15:42
@vrdmr
Copy link
Member

vrdmr commented Feb 1, 2022

Child of #939

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.

5 participants