2018-11-17 00:37:17 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-17 14:06:52 +00:00
|
|
|
module Gitlab
|
|
|
|
module Metrics
|
2017-10-19 11:48:27 +00:00
|
|
|
class BackgroundTransaction < Transaction
|
2017-10-17 14:06:52 +00:00
|
|
|
def initialize(worker_class)
|
2017-10-19 09:24:15 +00:00
|
|
|
super()
|
2017-10-17 14:06:52 +00:00
|
|
|
@worker_class = worker_class
|
|
|
|
end
|
|
|
|
|
|
|
|
def labels
|
2017-10-19 09:24:15 +00:00
|
|
|
{ controller: @worker_class.name, action: 'perform' }
|
2017-10-17 14:06:52 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|