summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-17 16:34:27 -0700
committerStan Hu <stanhu@gmail.com>2019-07-18 06:53:39 -0700
commit1136c0c8e98d4f0d3fb4f50219657cabe0d45c99 (patch)
tree7c555a4d2fa9796cdcba2ac4de2514a974179f31 /scripts
parent037096ef6c2c2f804302efb429bcd1eb5123b5e9 (diff)
downloadgitlab-ce-1136c0c8e98d4f0d3fb4f50219657cabe0d45c99.tar.gz
Add Rugged calls and duration to API and Rails logs
This adds `rugged_duration_ms` and `rugged_calls` fields to `api_json.log` and `production_json.log`. This will make it easier to identify performance issues caused by excessive I/O. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64676
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/lint-rugged7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lint-rugged b/scripts/lint-rugged
index 9466c62a415..e1605b4501b 100755
--- a/scripts/lint-rugged
+++ b/scripts/lint-rugged
@@ -10,7 +10,12 @@ ALLOWED = [
# Reverted Rugged calls due to Gitaly atop NFS performance
# See https://docs.gitlab.com/ee/development/gitaly.html#legacy-rugged-code.
'lib/gitlab/git/rugged_impl/',
- 'lib/gitlab/gitaly_client/storage_settings.rb'
+ 'lib/gitlab/gitaly_client/storage_settings.rb',
+
+ # Needed for logging
+ 'config/initializers/lograge.rb',
+ 'lib/gitlab/grape_logging/loggers/perf_logger.rb',
+ 'lib/gitlab/rugged_instrumentation.rb'
].freeze
rugged_lines = IO.popen(%w[git grep -i -n rugged -- app config lib], &:read).lines