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:
Diffstat (limited to 'lib/gitlab/instrumentation_helper.rb')
-rw-r--r--lib/gitlab/instrumentation_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab/instrumentation_helper.rb b/lib/gitlab/instrumentation_helper.rb
index b8a2567b775..15a760fada0 100644
--- a/lib/gitlab/instrumentation_helper.rb
+++ b/lib/gitlab/instrumentation_helper.rb
@@ -35,6 +35,7 @@ module Gitlab
instrument_uploads(payload)
instrument_rate_limiting_gates(payload)
instrument_global_search_api(payload)
+ instrument_ldap(payload)
end
def instrument_gitaly(payload)
@@ -136,6 +137,14 @@ module Gitlab
payload.merge!(::Gitlab::Instrumentation::GlobalSearchApi.payload)
end
+ def instrument_ldap(payload)
+ ldap_count = Gitlab::Metrics::Subscribers::Ldap.count
+
+ return if ldap_count == 0
+
+ payload.merge! Gitlab::Metrics::Subscribers::Ldap.payload
+ end
+
# Returns the queuing duration for a Sidekiq job in seconds, as a float, if the
# `enqueued_at` field or `created_at` field is available.
#