GEODE-10231 : Add configuration for suppressing FunctionException logging#7584
Open
zsitole wants to merge 5 commits intoapache:developfrom
Open
GEODE-10231 : Add configuration for suppressing FunctionException logging#7584zsitole wants to merge 5 commits intoapache:developfrom
zsitole wants to merge 5 commits intoapache:developfrom
Conversation
DonalEvans
approved these changes
Apr 12, 2022
jake-at-work
requested changes
Apr 12, 2022
geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
Outdated
Show resolved
Hide resolved
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. |
jake-at-work
requested changes
Apr 14, 2022
...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
mhansonp
approved these changes
Apr 18, 2022
albertogpz
approved these changes
Apr 19, 2022
…ging Use Log4j Markers for FunctionException logs
0b5d004 to
7f85a9a
Compare
jake-at-work
approved these changes
Apr 19, 2022
jinmeiliao
approved these changes
Apr 20, 2022
nabarunnag
requested changes
Apr 20, 2022
Contributor
nabarunnag
left a comment
There was a problem hiding this comment.
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
albertogpz
requested changes
Apr 25, 2022
…ging Hotfix documentation for FunctionException logging
albertogpz
approved these changes
Apr 26, 2022
Contributor
Fixed Log4j capital letters
nabarunnag
approved these changes
Apr 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 buildrun 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?