Module: Skylight::Probes::HTTPClient::Instrumentation Private
- Defined in:
- lib/skylight/probes/httpclient.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#do_request(method, uri) ⇒ Object
private
HTTPClient has request methods on the class object itself, but they internally instantiate a client and perform the method on that, so this instance method override will cover both ‘HTTPClient.get(…)` and `HTTPClient.new.get(…)`.
Instance Method Details
#do_request(method, uri) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
HTTPClient has request methods on the class object itself, but they internally instantiate a client and perform the method on that, so this instance method override will cover both ‘HTTPClient.get(…)` and `HTTPClient.new.get(…)`
12 13 14 15 16 17 18 |
# File 'lib/skylight/probes/httpclient.rb', line 12 def do_request(method, uri, *) return super if Probes::HTTPClient::Probe.disabled? opts = Formatters::HTTP.build_opts(method, uri.scheme, uri.host, uri.port, uri.path, uri.query) Skylight.instrument(opts) { super } end |