-
Notifications
You must be signed in to change notification settings - Fork 685
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
base: develop
Are you sure you want to change the base?
Conversation
geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
Outdated
Show resolved
Hide resolved
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. |
...rc/main/java/org/apache/geode/internal/cache/execute/ServerToClientFunctionResultSender.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunction66.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/geode/management/internal/cli/functions/UserFunctionExecution.java
Outdated
Show resolved
Hide resolved
…ging Use Log4j Markers for FunctionException logs
0b5d004
to
7f85a9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need documentation for this feature in page: https://geode.apache.org/docs/guide/113/managing/logging/configuring_log4j2.html and https://geode.apache.org/docs/guide/114/developing/function_exec/function_execution.html
…ging Add documentation for FunctionException logging
…ging Hotfix documentation for FunctionException logging
Fixed Log4j capital letters
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?