Skip to content

Commit

Permalink
Add test for untraced.
Browse files Browse the repository at this point in the history
  • Loading branch information
misalcedo authored Nov 21, 2023
1 parent d1aa1d4 commit e3fde0c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@

assert_http_spans(exception: 'Excon::Error::Socket')
end

it 'emits no spans when untraced' do
OpenTelemetry::Common::Utilities.untraced do
_(-> { Excon.get('http://localhost', proxy: 'https://proxy_user:proxy_pass@localhost') }).must_raise(Excon::Error::Socket)

_(exporter.finished_spans.size).must_equal(0)
end
end
end

def assert_http_spans(scheme: 'http', host: 'localhost', target: '/', exception: nil)
Expand Down

0 comments on commit e3fde0c

Please sign in to comment.