Module: Datadog::Contrib::Httprb::Patcher
- Includes:
- Patcher
- Defined in:
- lib/ddtrace/contrib/httprb/patcher.rb
Overview
Patcher enables patching of ‘httprb’ module.
Class Method Summary collapse
-
.patch ⇒ Object
patch applies our patch.
- .patched? ⇒ Boolean
- .target_version ⇒ Object
Methods included from Patcher
Class Method Details
.patch ⇒ Object
patch applies our patch
23 24 25 26 27 28 29 30 31 |
# File 'lib/ddtrace/contrib/httprb/patcher.rb', line 23 def patch do_once(:httprb) do begin ::HTTP::Client.send(:include, Instrumentation) rescue StandardError => e Datadog::Logger.error("Unable to apply httprb integration: #{e}") end end end |
.patched? ⇒ Boolean
14 15 16 |
# File 'lib/ddtrace/contrib/httprb/patcher.rb', line 14 def patched? done?(:httprb) end |
.target_version ⇒ Object
18 19 20 |
# File 'lib/ddtrace/contrib/httprb/patcher.rb', line 18 def target_version Integration.version end |