debian-mirror-gitlab/lib/gitlab/metrics/background_transaction.rb

17 lines
379 B
Ruby
Raw Normal View History

2018-12-23 12:14:25 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module Gitlab
module Metrics
class BackgroundTransaction < Transaction
def initialize(worker_class)
super()
@worker_class = worker_class
end
def labels
2020-07-28 23:09:34 +05:30
{ controller: @worker_class.name, action: 'perform', feature_category: @worker_class.try(:get_feature_category).to_s }
2018-03-17 18:26:18 +05:30
end
end
end
end