-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Remove user data from logs when not in debug/trace mode #17007
base: main
Are you sure you want to change the base?
Conversation
❌ Gradle check result for 5443075: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Mohit Godwani <[email protected]>
❌ Gradle check result for 16eb613: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Mohit Godwani <[email protected]>
❌ Gradle check result for c0a14c7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 8337fd0: Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Mohit Godwani <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17007 +/- ##
============================================
+ Coverage 72.22% 72.23% +0.01%
+ Complexity 65356 65324 -32
============================================
Files 5301 5301
Lines 303774 303775 +1
Branches 44016 44017 +1
============================================
+ Hits 219386 219447 +61
+ Misses 66453 66355 -98
- Partials 17935 17973 +38 ☔ View full report in Codecov by Sentry. |
@@ -128,7 +129,11 @@ Tuple<UpdateOpType, Map<String, Object>> executeScriptedUpsert(Map<String, Objec | |||
|
|||
if (operation != UpdateOpType.CREATE && operation != UpdateOpType.NONE) { | |||
// Only valid options for an upsert script are "create" (the default) or "none", meaning abort upsert | |||
logger.warn("Invalid upsert operation [{}] for script [{}], doing nothing...", operation, script.getIdOrCode()); | |||
if (logger.isDebugEnabled() || ScriptType.STORED.equals(script.getType())) { |
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.
why check for stored script here?
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.
In case of stored script, id gets logged which should be fine as it shouldn't expose user data and continues to help with debugging. For inline scripts in request, we may end up logging the entire user provided script here. Hence, kept this check to ensure some debuggability,
Description
Remove user data from logs when not in debug/trace mode.
Related Issues
NA
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.