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/metrics/exporter/web_exporter.rb')
-rw-r--r--lib/gitlab/metrics/exporter/web_exporter.rb55
1 files changed, 0 insertions, 55 deletions
diff --git a/lib/gitlab/metrics/exporter/web_exporter.rb b/lib/gitlab/metrics/exporter/web_exporter.rb
index c05ad8ccf42..9a471c33770 100644
--- a/lib/gitlab/metrics/exporter/web_exporter.rb
+++ b/lib/gitlab/metrics/exporter/web_exporter.rb
@@ -4,64 +4,9 @@ module Gitlab
module Metrics
module Exporter
class WebExporter < BaseExporter
- ExporterCheck = Struct.new(:exporter) do
- def readiness
- Gitlab::HealthChecks::Result.new(
- 'web_exporter', exporter.running)
- end
-
- def available?
- true
- end
- end
-
- RailsMetricsInitializer = Struct.new(:app) do
- def call(env)
- Gitlab::Metrics::RailsSlis.initialize_request_slis_if_needed!
-
- app.call(env)
- end
- end
-
- attr_reader :running
-
# This exporter is always run on master process
def initialize(**options)
super(Settings.monitoring.web_exporter, log_enabled: true, log_file: 'web_exporter.log', **options)
-
- # DEPRECATED:
- # these `readiness_checks` are deprecated
- # as presenting no value in a way how we run
- # application: https://gitlab.com/gitlab-org/gitlab/issues/35343
- self.readiness_checks = [
- WebExporter::ExporterCheck.new(self),
- Gitlab::HealthChecks::PumaCheck
- ]
- end
-
- def mark_as_not_running!
- @running = false
- end
-
- private
-
- def rack_app
- app = super
-
- Rack::Builder.app do
- use RailsMetricsInitializer
- run app
- end
- end
-
- def start_working
- @running = true
- super
- end
-
- def stop_working
- mark_as_not_running!
- super
end
end
end