From 35fb27db277be62dde1f5c58709fd6af59c144a9 Mon Sep 17 00:00:00 2001 From: Aleksei Lipniagov Date: Mon, 12 Aug 2019 13:16:25 +0300 Subject: [PATCH] Remove worker label from puma terminations metric --- lib/gitlab/cluster/puma_worker_killer_observer.rb | 4 +--- spec/lib/gitlab/cluster/puma_worker_killer_observer_spec.rb | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/gitlab/cluster/puma_worker_killer_observer.rb b/lib/gitlab/cluster/puma_worker_killer_observer.rb index 3b4ebc3fbae..f53051c32ff 100644 --- a/lib/gitlab/cluster/puma_worker_killer_observer.rb +++ b/lib/gitlab/cluster/puma_worker_killer_observer.rb @@ -15,9 +15,7 @@ module Gitlab private def log_termination(worker) - labels = { worker: "worker_#{worker.index}" } - - @counter.increment(labels) + @counter.increment end end end diff --git a/spec/lib/gitlab/cluster/puma_worker_killer_observer_spec.rb b/spec/lib/gitlab/cluster/puma_worker_killer_observer_spec.rb index 180520b27e7..6ed9dda08d7 100644 --- a/spec/lib/gitlab/cluster/puma_worker_killer_observer_spec.rb +++ b/spec/lib/gitlab/cluster/puma_worker_killer_observer_spec.rb @@ -17,9 +17,7 @@ describe Gitlab::Cluster::PumaWorkerKillerObserver do it 'increments timeout counter' do worker = double(index: 0) - expect(counter) - .to receive(:increment) - .with({ worker: 'worker_0' }) + expect(counter).to receive(:increment) subject.callback.call(worker) end