Skip to content

Commit c990c28

Browse files
committed
Cleanup
1 parent 3cfcc1e commit c990c28

File tree

6 files changed

+3
-14
lines changed

6 files changed

+3
-14
lines changed

instrumentation/http/test/instrumentation/http/patches/dup/client_test.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
describe 'installation' do
4848
it 'applies the correct patch when stability options include only http/dup and database' do
4949
ENV['OTEL_SEMCONV_STABILITY_OPT_IN'] = 'http/dup, database'
50-
5150
# simulate a fresh install:
5251
instrumentation.instance_variable_set(:@installed, false)
5352
instrumentation.install(config)
@@ -57,7 +56,6 @@
5756

5857
it 'applies the http/dup patch and excludes the Stable patch when both http and http/dup are present' do
5958
ENV['OTEL_SEMCONV_STABILITY_OPT_IN'] = 'http, http/dup'
60-
6159
# simulate a fresh install:
6260
instrumentation.instance_variable_set(:@installed, false)
6361
instrumentation.install(config)
@@ -72,15 +70,13 @@
7270
HTTP.get('http://example.com/success')
7371
_(exporter.finished_spans.size).must_equal(1)
7472
_(span.name).must_equal 'HTTP GET'
75-
7673
# Old semantic conventions
7774
_(span.attributes['http.method']).must_equal 'GET'
7875
_(span.attributes['http.scheme']).must_equal 'http'
7976
_(span.attributes['http.status_code']).must_equal 200
8077
_(span.attributes['http.target']).must_equal '/success'
8178
_(span.attributes['net.peer.name']).must_equal 'example.com'
8279
_(span.attributes['net.peer.port']).must_equal 80
83-
8480
# Stable semantic conventions
8581
_(span.attributes['http.request.method']).must_equal 'GET'
8682
_(span.attributes['url.scheme']).must_equal 'http'

instrumentation/http/test/instrumentation/http/patches/dup/connection_test.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
describe 'installation' do
3232
it 'installs the patch when env var has multiple configs' do
3333
ENV['OTEL_SEMCONV_STABILITY_OPT_IN'] = 'http/dup, database'
34-
instrumentation.install({}) # simulate a fresh install:
34+
instrumentation.install({}) # simulate a fresh install
3535

3636
_(HTTP::Connection.ancestors).must_include OpenTelemetry::Instrumentation::HTTP::Patches::Dup::Connection
3737
end
@@ -51,11 +51,9 @@
5151

5252
_(exporter.finished_spans.size).must_equal(2)
5353
_(span.name).must_equal 'HTTP CONNECT'
54-
5554
# Old semantic conventions
5655
_(span.attributes['net.peer.name']).must_equal('localhost')
5756
_(span.attributes['net.peer.port']).wont_be_nil
58-
5957
# Stable semantic conventions
6058
_(span.attributes['server.address']).must_equal('localhost')
6159
_(span.attributes['server.port']).wont_be_nil

instrumentation/http/test/instrumentation/http/patches/old/client_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
describe 'installation' do
4646
it 'applies the correct patch when stability options do not include HTTP stability modes' do
4747
ENV['OTEL_SEMCONV_STABILITY_OPT_IN'] = 'database'
48-
4948
# simulate a fresh install:
5049
instrumentation.instance_variable_set(:@installed, false)
5150
instrumentation.install(config)

instrumentation/http/test/instrumentation/http/patches/old/connection.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
describe 'installation' do
2828
it 'applies the correct patch when stability options do not include HTTP stability modes' do
2929
ENV['OTEL_SEMCONV_STABILITY_OPT_IN'] = 'database'
30-
31-
# simulate a fresh install:
32-
instrumentation.instance_variable_set(:@installed, false)
33-
instrumentation.install(config)
30+
instrumentation.install({}) # simulate a fresh install
3431

3532
_(HTTP::Connection.ancestors).must_include OpenTelemetry::Instrumentation::HTTP::Patches::Old::Connection
3633
end

instrumentation/http/test/instrumentation/http/patches/stable/client_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
describe 'installation' do
4949
it 'applies the correct patch when stability options include only http/dup and database' do
5050
ENV['OTEL_SEMCONV_STABILITY_OPT_IN'] = 'http, database'
51-
5251
# simulate a fresh install:
5352
instrumentation.instance_variable_set(:@installed, false)
5453
instrumentation.install(config)

instrumentation/http/test/instrumentation/http/patches/stable/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
describe 'installation' do
3232
it 'installs the patch when env var has multiple configs' do
3333
ENV['OTEL_SEMCONV_STABILITY_OPT_IN'] = 'http/dup, database'
34-
instrumentation.install({}) # simulate a fresh install:
34+
instrumentation.install({}) # simulate a fresh install
3535

3636
_(HTTP::Connection.ancestors).must_include OpenTelemetry::Instrumentation::HTTP::Patches::Dup::Connection
3737
end

0 commit comments

Comments
 (0)