debian-mirror-gitlab/lib/gitlab/metrics/background_transaction.rb
2020-08-09 17:44:08 +05:30

16 lines
379 B
Ruby

# frozen_string_literal: true
module Gitlab
module Metrics
class BackgroundTransaction < Transaction
def initialize(worker_class)
super()
@worker_class = worker_class
end
def labels
{ controller: @worker_class.name, action: 'perform', feature_category: @worker_class.try(:get_feature_category).to_s }
end
end
end
end