diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-12 12:13:28 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-14 20:53:54 -0700 |
commit | 0ffac1ab27776d4bd68b552ca0e57fb8c9dfb40a (patch) | |
tree | 52f562bb5300c682ab4bd4e16fc62ff1f9a40e8c | |
parent | b1ef2da4827816accb63f46b7b07903e3d29d7a4 (diff) | |
download | gitlab-ce-0ffac1ab27776d4bd68b552ca0e57fb8c9dfb40a.tar.gz |
Filter Geo proxied data from api_json.logsh-filter-geo-output
Currently the base64-encoded value of the push-to-secondary data is
saved in `api_json.log`, and this can easily be hundreds of
megabytes. We should filter this from the logs.
-rw-r--r-- | lib/api/api.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 574934d7f90..223ae13bd2d 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -10,13 +10,14 @@ module API NAMESPACE_OR_PROJECT_REQUIREMENTS = { id: NO_SLASH_URL_PART_REGEX }.freeze COMMIT_ENDPOINT_REQUIREMENTS = NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(sha: NO_SLASH_URL_PART_REGEX).freeze USER_REQUIREMENTS = { user_id: NO_SLASH_URL_PART_REGEX }.freeze + LOG_FILTERS = ::Rails.application.config.filter_parameters + [/^output$/] insert_before Grape::Middleware::Error, GrapeLogging::Middleware::RequestLogger, logger: Logger.new(LOG_FILENAME), formatter: Gitlab::GrapeLogging::Formatters::LogrageWithTimestamp.new, include: [ - GrapeLogging::Loggers::FilterParameters.new, + GrapeLogging::Loggers::FilterParameters.new(LOG_FILTERS), GrapeLogging::Loggers::ClientEnv.new, Gitlab::GrapeLogging::Loggers::RouteLogger.new, Gitlab::GrapeLogging::Loggers::UserLogger.new, |