Skip to content

Commit

Permalink
Fix hearth spec failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jterapin committed Jul 11, 2024
1 parent a3b62fb commit a8a6861
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hearth/spec/hearth/telemetry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ module Telemetry

describe ':context_manager' do
after { OpenTelemetry::Context.clear }
let(:tracer_provider) { otel_provider.tracer_provider }
let(:subject) { otel_provider.context_manager }
let(:tracer_provider) { otel_provider.tracer_provider }
let(:root_context) { OpenTelemetry::Context::ROOT }
let(:new_context) do
OpenTelemetry::Context.empty.set_value('foo', 'bar')
Expand All @@ -125,7 +125,9 @@ module Telemetry

describe '#current_span' do
it 'returns the current span' do
wrapper_span = tracer_provider.tracer.in_span('test') {}
wrapper_span = tracer_provider.tracer.in_span('some_span') do |span|
span.set_attribute('foo', 'bar')
end
expect(subject.current_span).to eq(wrapper_span)
end
end
Expand Down Expand Up @@ -164,7 +166,6 @@ module Telemetry
# end
# end
end

end
end
end
Expand Down

0 comments on commit a8a6861

Please sign in to comment.