Module: Datadog::Contrib::HTTP::Patcher
- Includes:
- Patcher
- Defined in:
- lib/ddtrace/contrib/http/patcher.rb
Overview
Patcher enables patching of ‘net/http’ module.
Class Method Summary collapse
-
.patch ⇒ Object
patch applies our patch if needed.
- .patched? ⇒ Boolean
Methods included from Patcher
Class Method Details
.patch ⇒ Object
patch applies our patch if needed
20 21 22 23 24 25 26 27 28 |
# File 'lib/ddtrace/contrib/http/patcher.rb', line 20 def patch do_once(:http) do begin ::Net::HTTP.send(:include, Instrumentation) rescue StandardError => e Datadog::Tracer.log.error("Unable to apply net/http integration: #{e}") end end end |
.patched? ⇒ Boolean
15 16 17 |
# File 'lib/ddtrace/contrib/http/patcher.rb', line 15 def patched? done?(:http) end |