Skip to content

Commit dba222e

Browse files
committed
Test with traces enabled.
1 parent 96b9750 commit dba222e

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

async-http.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
spec.add_dependency "protocol-http", "~> 0.23.1"
2424
spec.add_dependency "protocol-http1", "~> 0.14.0"
2525
spec.add_dependency "protocol-http2", "~> 0.14.0"
26-
spec.add_dependency "traces", ">= 0.4.0"
26+
spec.add_dependency "traces", ">= 0.8.0"
2727

2828
spec.add_development_dependency "async-container", "~> 0.14"
2929
spec.add_development_dependency "async-rspec", "~> 1.10"

lib/async/http/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def call(request)
161161
end
162162

163163
trace('async.http.client.call', attributes: attributes) do |span|
164-
if context = trace_context(span)
164+
if context = self.trace_context
165165
request.headers['traceparent'] = context.to_s
166166
# request.headers['tracestate'] = context.state
167167
end

spec/spec_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
require 'async/rspec'
2727

28+
ENV['TRACES_BACKEND'] ||= 'traces/backend/test'
29+
2830
RSpec.shared_context 'docstring as description' do
2931
let(:description) {self.class.metadata.fetch(:description_args).first}
3032
end

0 commit comments

Comments
 (0)