diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-07-18 18:43:37 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-07-18 18:43:37 +0300 |
commit | 090ca4f7e3910b5711e570dfa2bbaa68532a28ba (patch) | |
tree | fedf2ec579e9bdcbafb7073aee63dd5f456964ee /config | |
parent | 2044473dad12e925df4dda22bfef44418f045af4 (diff) | |
parent | 1136c0c8e98d4f0d3fb4f50219657cabe0d45c99 (diff) |
Merge branch 'sh-add-rugged-logs' into 'master'
Add Rugged calls and duration to API and Rails logs
Closes #64676
See merge request gitlab-org/gitlab-ce!30871
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/lograge.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb index fbec28186eb..3d84b4e44ce 100644 --- a/config/initializers/lograge.rb +++ b/config/initializers/lograge.rb @@ -34,6 +34,13 @@ unless Sidekiq.server? payload[:gitaly_duration] = Gitlab::GitalyClient.query_time_ms end + rugged_calls = Gitlab::RuggedInstrumentation.query_count + + if rugged_calls > 0 + payload[:rugged_calls] = rugged_calls + payload[:rugged_duration_ms] = Gitlab::RuggedInstrumentation.query_time_ms + end + payload[:response] = event.payload[:response] if event.payload[:response] payload[Labkit::Correlation::CorrelationId::LOG_KEY] = Labkit::Correlation::CorrelationId.current_id |