diff options
author | Aleksei Lipniagov <alipniagov@gitlab.com> | 2019-07-18 14:57:48 +0300 |
---|---|---|
committer | Aleksei Lipniagov <alipniagov@gitlab.com> | 2019-07-18 15:00:22 +0300 |
commit | 8ff9076b8926e0c40b3e21a63afccef94b07962c (patch) | |
tree | 9b03b19ee60fc53c2ec5fad862e8b19c825dc766 | |
parent | 7b3f639415e33fd6c6d96e12f54b4ac3e263a7e6 (diff) | |
download | gitlab-ce-63870-fix-pid-providing-for-prometheus.tar.gz |
Add a link to the follow-up issue63870-fix-pid-providing-for-prometheus
-rw-r--r-- | lib/prometheus/pid_provider.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/prometheus/pid_provider.rb b/lib/prometheus/pid_provider.rb index 2a611f78dbf..c92522c73c5 100644 --- a/lib/prometheus/pid_provider.rb +++ b/lib/prometheus/pid_provider.rb @@ -20,10 +20,16 @@ module Prometheus private + # This is not fully accurate as we don't really know if the nil returned + # is actually means we're on master or not. + # Follow up issue was created to address this problem and + # to introduce more structrured approach to a current process discovery: + # https://gitlab.com/gitlab-org/gitlab-ce/issues/64740 def unicorn_worker_id ::Prometheus::Client::Support::Unicorn.worker_id || 'master' end + # See the comment for #unicorn_worker_id def puma_worker_id match = process_name.match(/cluster worker ([0-9]+):/) match ? match[1] : 'master' |