Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur committed Oct 24, 2024
1 parent e407935 commit 8a6e086
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/datadog/tracing/tracer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@
expect(span.get_tag('my')).to eq('tag')
end

context 'contains version and span.service is not equal to the default tracer service' do
let(:tracer_options) { { default_service: 'global-service', tags: { 'version' => '1.1.0' } } }
let(:service) { 'my-service' }
it 'does not set version on the span' do
expect(tracer.default_service).to eq('global-service')
expect(span.service).not_to eq('my-service')

expect(tracer.tags).to include('version' => '1.1.0')
expect(span.tags).not_to include('version')
end
end

context 'and default tags are set on the tracer' do
let(:tracer_options) { { tags: default_tags } }

Expand Down

0 comments on commit 8a6e086

Please sign in to comment.