diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /lib/gitlab/lograge | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'lib/gitlab/lograge')
-rw-r--r-- | lib/gitlab/lograge/custom_options.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/lograge/custom_options.rb b/lib/gitlab/lograge/custom_options.rb index 145d67d7101..55c46c365f6 100644 --- a/lib/gitlab/lograge/custom_options.rb +++ b/lib/gitlab/lograge/custom_options.rb @@ -3,6 +3,8 @@ module Gitlab module Lograge module CustomOptions + include ::Gitlab::Logging::CloudflareHelper + LIMITED_ARRAY_SENTINEL = { key: 'truncated', value: '...' }.freeze IGNORE_PARAMS = Set.new(%w(controller action format)).freeze @@ -21,6 +23,8 @@ module Gitlab queue_duration_s: event.payload[:queue_duration_s] } + payload.merge!(event.payload[:metadata]) if event.payload[:metadata] + ::Gitlab::InstrumentationHelper.add_instrumentation_data(payload) payload[:response] = event.payload[:response] if event.payload[:response] @@ -31,6 +35,10 @@ module Gitlab payload[:cpu_s] = cpu_s.round(2) end + CLOUDFLARE_CUSTOM_HEADERS.each do |_, value| + payload[value] = event.payload[value] if event.payload[value] + end + # https://github.com/roidrage/lograge#logging-errors--exceptions exception = event.payload[:exception_object] |