diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2018-09-04 17:14:22 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-09-04 17:14:22 +0000 |
commit | a62a65b869946db25e94ac6d250883cfe2d8758c (patch) | |
tree | fc302f2c309b12f8d98c92268b2ca536133c56c4 /lib/gitlab/grape_logging | |
parent | 304f43c2fbe319720c7c372adea997be14aed9e9 (diff) | |
download | gitlab-ce-a62a65b869946db25e94ac6d250883cfe2d8758c.tar.gz |
Add gitaly_calls to API structured logs
Diffstat (limited to 'lib/gitlab/grape_logging')
-rw-r--r-- | lib/gitlab/grape_logging/loggers/perf_logger.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gitlab/grape_logging/loggers/perf_logger.rb b/lib/gitlab/grape_logging/loggers/perf_logger.rb new file mode 100644 index 00000000000..e3b9c59bd6e --- /dev/null +++ b/lib/gitlab/grape_logging/loggers/perf_logger.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# This module adds additional performance metrics to the grape logger +module Gitlab + module GrapeLogging + module Loggers + class PerfLogger < ::GrapeLogging::Loggers::Base + def parameters(_, _) + { gitaly_calls: Gitlab::GitalyClient.get_request_count } + end + end + end + end +end |