Skip to content

Commit

Permalink
Test with traces enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 10, 2022
1 parent 96b9750 commit dba222e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion async-http.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "protocol-http", "~> 0.23.1"
spec.add_dependency "protocol-http1", "~> 0.14.0"
spec.add_dependency "protocol-http2", "~> 0.14.0"
spec.add_dependency "traces", ">= 0.4.0"
spec.add_dependency "traces", ">= 0.8.0"

spec.add_development_dependency "async-container", "~> 0.14"
spec.add_development_dependency "async-rspec", "~> 1.10"
Expand Down
2 changes: 1 addition & 1 deletion lib/async/http/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def call(request)
end

trace('async.http.client.call', attributes: attributes) do |span|
if context = trace_context(span)
if context = self.trace_context
request.headers['traceparent'] = context.to_s
# request.headers['tracestate'] = context.state
end
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

require 'async/rspec'

ENV['TRACES_BACKEND'] ||= 'traces/backend/test'

RSpec.shared_context 'docstring as description' do
let(:description) {self.class.metadata.fetch(:description_args).first}
end
Expand Down

0 comments on commit dba222e

Please sign in to comment.