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
path: root/bin
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-12-03 06:14:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-03 06:14:42 +0300
commitc657078ecb4bff69e58f6911713e143c99f2c71f (patch)
tree5a4dc8bf80b14c3202de9c7bd51363f3d73af541 /bin
parent498ba9dc41fcf2b4be30a8f3721543953efb3c3b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'bin')
-rwxr-xr-xbin/metrics-server15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/metrics-server b/bin/metrics-server
new file mode 100755
index 00000000000..48d3a6402c3
--- /dev/null
+++ b/bin/metrics-server
@@ -0,0 +1,15 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+require_relative '../metrics_server/metrics_server'
+
+begin
+ target = ENV['METRICS_SERVER_TARGET']
+ raise "Required: METRICS_SERVER_TARGET=[sidekiq]" unless target == 'sidekiq'
+
+ metrics_dir = ENV["prometheus_multiproc_dir"] || File.absolute_path("tmp/prometheus_multiproc_dir/#{target}")
+
+ # Re-raise exceptions in threads on the main thread.
+ Thread.abort_on_exception = true
+ MetricsServer.new(target, metrics_dir).start
+end