summaryrefslogtreecommitdiff
path: root/lib/api/api.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-05-25 21:00:26 -0700
committerStan Hu <stanhu@gmail.com>2018-05-28 13:56:42 -0700
commit16e04e006cf8996883ef0c5b7881eb3cbb7079ce (patch)
tree6ffe689260eec3a2abf08214d1f66e884f82083f /lib/api/api.rb
parent6e354cb642f911dc71be3d5368f066900fc25970 (diff)
downloadgitlab-ce-16e04e006cf8996883ef0c5b7881eb3cbb7079ce.tar.gz
Log queue duration for Grape API callssh-tag-queue-duration-api-calls
This mimics the same thing the RailsQueueDuration does for Rails controller requests and will help diagnose issues with API delays. Closes #46601
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index de20b2b8e67..206fabe5c43 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -15,7 +15,8 @@ module API
include: [
GrapeLogging::Loggers::FilterParameters.new,
GrapeLogging::Loggers::ClientEnv.new,
- Gitlab::GrapeLogging::Loggers::UserLogger.new
+ Gitlab::GrapeLogging::Loggers::UserLogger.new,
+ Gitlab::GrapeLogging::Loggers::QueueDurationLogger.new
]
allow_access_with_scope :api