Make BackgroundTransaction#labels public

as are all other Transaction implementations
This commit is contained in:
Pawel Chojnacki 2017-11-07 19:23:52 +01:00
parent b16c2ef7d5
commit 90edcb45cd
2 changed files with 6 additions and 2 deletions

View File

@ -6,8 +6,6 @@ module Gitlab
@worker_class = worker_class
end
protected
def labels
{ controller: @worker_class.name, action: 'perform' }
end

View File

@ -10,4 +10,10 @@ describe Gitlab::Metrics::BackgroundTransaction do
expect(subject.action).to eq('TestWorker#perform')
end
end
describe '#label' do
it 'returns labels based on class name' do
expect(subject.labels).to eq(controller: 'TestWorker', action: 'perform')
end
end
end