Module: Datadog::Tracing::Contrib::Httprb::Patcher
- Includes:
- Patcher
- Defined in:
- lib/datadog/tracing/contrib/httprb/patcher.rb
Overview
Patcher enables patching of ‘httprb’ module.
Constant Summary collapse
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
27 28 29 30 31 32 33 34 35 |
# File 'lib/datadog/tracing/contrib/httprb/patcher.rb', line 27 def patch PATCH_ONLY_ONCE.run do begin ::HTTP::Client.include(Instrumentation) rescue StandardError => e Datadog.logger.error("Unable to apply httprb integration: #{e}") end end end |
.patched? ⇒ Boolean
18 19 20 |
# File 'lib/datadog/tracing/contrib/httprb/patcher.rb', line 18 def patched? PATCH_ONLY_ONCE.ran? end |
.target_version ⇒ Object
22 23 24 |
# File 'lib/datadog/tracing/contrib/httprb/patcher.rb', line 22 def target_version Integration.version end |