File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
spec . add_dependency "protocol-http" , "~> 0.24.0"
24
24
spec . add_dependency "protocol-http1" , "~> 0.15.0"
25
25
spec . add_dependency "protocol-http2" , "~> 0.15.0"
26
- spec . add_dependency "traces" , ">= 0.8 .0"
26
+ spec . add_dependency "traces" , ">= 0.10 .0"
27
27
28
28
spec . add_development_dependency "async-container" , "~> 0.14"
29
29
spec . add_development_dependency "async-rspec" , "~> 1.10"
Original file line number Diff line number Diff line change @@ -144,8 +144,8 @@ def call(request)
144
144
attributes [ 'http.request.length' ] = length
145
145
end
146
146
147
- trace ( 'async.http.client.call' , attributes : attributes ) do |span |
148
- if context = self . trace_context
147
+ Traces . trace ( 'async.http.client.call' , attributes : attributes ) do |span |
148
+ if context = Traces . trace_context
149
149
request . headers [ 'traceparent' ] = context . to_s
150
150
# request.headers['tracestate'] = context.state
151
151
end
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ def run
61
61
Traces ::Provider ( self ) do
62
62
def call ( request )
63
63
if trace_parent = request . headers [ 'traceparent' ]
64
- self . trace_context = Traces ::Context . parse ( trace_parent . join , request . headers [ 'tracestate' ] , remote : true )
64
+ Traces . trace_context = Traces ::Context . parse ( trace_parent . join , request . headers [ 'tracestate' ] , remote : true )
65
65
end
66
66
67
67
attributes = {
@@ -80,7 +80,7 @@ def call(request)
80
80
attributes [ 'http.protocol' ] = protocol
81
81
end
82
82
83
- trace ( 'async.http.server.call' , resource : "#{ request . method } #{ request . path } " , attributes : attributes ) do |span |
83
+ Traces . trace ( 'async.http.server.call' , resource : "#{ request . method } #{ request . path } " , attributes : attributes ) do |span |
84
84
super . tap do |response |
85
85
if status = response &.status
86
86
span [ 'http.status_code' ] = status
You can’t perform that action at this time.
0 commit comments