Skip to content

Commit

Permalink
[faraday] distributed tracing headers must be string
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Palazzetti committed Oct 5, 2017
1 parent 0156962 commit 82ac4ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ddtrace/contrib/faraday/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def handle_response(span, env)

def propagate!(span, env)
env[:request_headers].merge!(
Ext::DistributedTracing::HTTP_HEADER_TRACE_ID => span.trace_id,
Ext::DistributedTracing::HTTP_HEADER_PARENT_ID => span.span_id
Ext::DistributedTracing::HTTP_HEADER_TRACE_ID => span.trace_id.to_s,
Ext::DistributedTracing::HTTP_HEADER_PARENT_ID => span.span_id.to_s
)
end

Expand Down
4 changes: 2 additions & 2 deletions test/contrib/faraday/middleware_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def test_distributed_tracing
headers = response.env.request_headers
span = request_span

assert_equal(headers[Ext::DistributedTracing::HTTP_HEADER_TRACE_ID], span.trace_id)
assert_equal(headers[Ext::DistributedTracing::HTTP_HEADER_PARENT_ID], span.span_id)
assert_equal(headers[Ext::DistributedTracing::HTTP_HEADER_TRACE_ID], span.trace_id.to_s)
assert_equal(headers[Ext::DistributedTracing::HTTP_HEADER_PARENT_ID], span.span_id.to_s)
end

private
Expand Down

0 comments on commit 82ac4ca

Please sign in to comment.