-
Notifications
You must be signed in to change notification settings - Fork 328
Closed
Description
The new instrumentation feature (#499) does not seem to work, using the simplest example case.
It expects an instrumenter
object which responds to instrument
, start
, and stop
:
http/lib/http/features/instrumentation.rb
Lines 24 to 25 in 4bc1223
instrumenter.instrument("start_#{name}", :request => request) | |
instrumenter.start(name, :request => request) |
which means we have to pass
ActiveSupport::Notifications.instrumenter
(which differs from the documented example).
But when I try to make a request, it appears to fail when I chain a get
request:
2.5.1 :002 > require 'http'
=> true
2.5.1 :003 > require 'active_support/notifications'
=> true
2.5.1 :004 > HTTP.use(instrumentation: {instrumenter: ActiveSupport::Notifications.instrumenter}).get("https://httpbin.org/get")
Traceback (most recent call last):
16: from (irb):4
15: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/chainable.rb:20:in `get'
14: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/client.rb:29:in `request'
13: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:165:in `merge'
12: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:23:in `new'
11: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:23:in `new'
10: from /Users/josh/.rvm/gems/ruby-2.5.1gems/http-4.0.0/lib/http/options.rb:72:in `initialize'
9: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:72:in `each'
8: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:72:in `block in initialize'
7: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:188:in `[]='
6: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:110:in `features='
5: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:110:in `each_with_object'
4: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:110:in `each'
3: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:117:in `block in features='
2: from /Users/josh/.rvm/gems/ruby-2.5.1/gems/http-4.0.0/lib/http/options.rb:117:in `new'
1: from /Users/josh/.rvm/gems/ruby-2.5.1@/gems/http-4.0.0/lib/http/features/instrumentation.rb:18:in `initialize'
Metadata
Metadata
Assignees
Labels
No labels