Module: Gitlab::SidekiqDeathHandler

Extended by:
Gitlab::SidekiqMiddleware::MetricsHelper
Defined in:
lib/gitlab/sidekiq_death_handler.rb

Constant Summary

Constants included from Gitlab::SidekiqMiddleware::MetricsHelper

Gitlab::SidekiqMiddleware::MetricsHelper::FALSE_LABEL, Gitlab::SidekiqMiddleware::MetricsHelper::TRUE_LABEL

Class Method Summary collapse

Class Method Details

.counterObject


14
15
16
# File 'lib/gitlab/sidekiq_death_handler.rb', line 14

def counter
  @counter ||= ::Gitlab::Metrics.counter(:sidekiq_jobs_dead_total, 'Sidekiq dead jobs')
end

.handler(job, _exception) ⇒ Object


8
9
10
11
12
# File 'lib/gitlab/sidekiq_death_handler.rb', line 8

def handler(job, _exception)
  labels = create_labels(job['class'].constantize, job['queue'], job)

  counter.increment(labels)
end