Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 21:07:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 21:07:55 +0300
commit603c7d4cac5e28bc1c75e50c23ed2cbe56f1aafc (patch)
tree907f5b8ee1b6f5aad396e95e3327a08400b9e8ea /lib/gitlab/grape_logging
parent120f4aaedc8fe830a3f572491d240d8ee6addefb (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/grape_logging')
-rw-r--r--lib/gitlab/grape_logging/loggers/perf_logger.rb27
1 files changed, 4 insertions, 23 deletions
diff --git a/lib/gitlab/grape_logging/loggers/perf_logger.rb b/lib/gitlab/grape_logging/loggers/perf_logger.rb
index 7e86b35a215..ca4a702cb94 100644
--- a/lib/gitlab/grape_logging/loggers/perf_logger.rb
+++ b/lib/gitlab/grape_logging/loggers/perf_logger.rb
@@ -5,30 +5,11 @@ module Gitlab
module GrapeLogging
module Loggers
class PerfLogger < ::GrapeLogging::Loggers::Base
- def parameters(_, _)
- gitaly_data.merge(rugged_data)
- end
-
- def gitaly_data
- gitaly_calls = Gitlab::GitalyClient.get_request_count
+ include ::Gitlab::InstrumentationHelper
- return {} if gitaly_calls.zero?
-
- {
- gitaly_calls: Gitlab::GitalyClient.get_request_count,
- gitaly_duration: Gitlab::GitalyClient.query_time_ms
- }
- end
-
- def rugged_data
- rugged_calls = Gitlab::RuggedInstrumentation.query_count
-
- return {} if rugged_calls.zero?
-
- {
- rugged_calls: rugged_calls,
- rugged_duration_ms: Gitlab::RuggedInstrumentation.query_time_ms
- }
+ def parameters(_, _)
+ payload = {}
+ payload.tap { add_instrumentation_data(payload) }
end
end
end