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

GEODE-10231 : Add configuration for suppressing FunctionException logging #7584

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

zsitole
Copy link

@zsitole zsitole commented Apr 12, 2022

Jira: https://issues.apache.org/jira/browse/GEODE-10231
Problem:
The function executed on a server can throw FunctionException by the contract. Geode servers are logging all exceptions with stack trace to warn/error log level and respond error back to the client. But huge number of FunctionException thrown from user functions logged in geode server can affect performance, use disc space for the logs storage, and can complicate the analysis of log files.

Solution 1:
The improvement for server side logging is adding system property configuration for surprising FunctionException logging. With enabled property, all FunctionException caused by user functions will be logged to debug log level.

System property for suppressing FunctionException logging:
gemfire.logging.suppressFunctionExceptionLogging=true

Solution 2:
Add Log4j markers for all FunctionException logs to be able to handle them by Log4j filter configuration, eg. disable all function exception logs:
<MarkerFilter marker="FUNCTION_EXCEPTION_MARKER" onMatch="DENY" onMismatch="NEUTRAL"/>

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

@zsitole zsitole changed the title GEODE-10231 : Add configuration for suppressing FunctionException ging GEODE-10231 : Add configuration for suppressing FunctionException logging Apr 12, 2022
@zsitole zsitole marked this pull request as ready for review April 12, 2022 15:16
@jinmeiliao
Copy link
Member

If the exception is thrown back to the caller, we do not need to log it in info/warning level (because down the calling stack, someone else should log it), but if we are turning it into some other form (only sending down the message to the caller), then we should log it in its entirety. I hate to have support turn on "debug" logging in order to see what's going on.

…ging

Use Log4j Markers for FunctionException logs
Copy link
Contributor

@nabarunnag nabarunnag left a comment

Choose a reason for hiding this comment

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

…ging

Add documentation for FunctionException logging
@zsitole zsitole requested a review from nabarunnag April 22, 2022 14:31
…ging

Hotfix documentation for FunctionException logging
@zsitole zsitole requested a review from albertogpz April 26, 2022 08:00
@nabarunnag
Copy link
Contributor

Nordix#18

@jdeppe-pivotal jdeppe-pivotal removed their request for review January 25, 2024 17:08
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.

7 participants