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.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/gitlab/instrumentation_helper.rb b/lib/gitlab/instrumentation_helper.rb
index 15a760fada0..1b81ec012d1 100644
--- a/lib/gitlab/instrumentation_helper.rb
+++ b/lib/gitlab/instrumentation_helper.rb
@@ -23,6 +23,7 @@ module Gitlab
instrument_rugged(payload)
instrument_redis(payload)
instrument_elasticsearch(payload)
+ instrument_zoekt(payload)
instrument_throttle(payload)
instrument_active_record(payload)
instrument_external_http(payload)
@@ -72,6 +73,17 @@ module Gitlab
payload[:elasticsearch_timed_out_count] = Gitlab::Instrumentation::ElasticsearchTransport.get_timed_out_count
end
+ def instrument_zoekt(payload)
+ # Zoekt integration is only available in EE but instrumentation
+ # only depends on the Gem which is also available in FOSS.
+ zoekt_calls = Gitlab::Instrumentation::Zoekt.get_request_count
+
+ return if zoekt_calls == 0
+
+ payload[:zoekt_calls] = zoekt_calls
+ payload[:zoekt_duration_s] = Gitlab::Instrumentation::Zoekt.query_time
+ end
+
def instrument_external_http(payload)
external_http_count = Gitlab::Metrics::Subscribers::ExternalHttp.request_count