Filter API parameters in log messages more efficiently
What does this MR do and why?
Previously log parameters were truncated inside LogrageWithTimestamp
right before it emitted log lines, but that is a little late because
Grape attempts to filter out parameters using
ActiveSupport::ParameterFilter#filter
. That means every regular
expression defined in the filter has to be matched against every
parameter in the input payload.
To avoid this unnecessary work, truncate the parameters early in the chain with a new logger plugin.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Stan Hu