Module: Datadog::Tracing::Contrib::HTTPX::Patcher
- Includes:
- Patcher
- Defined in:
- lib/httpx/adapters/datadog.rb
Overview
Patcher enables patching of ‘httpx’ with datadog components.
Class Method Summary collapse
-
.patch ⇒ Object
loads a session instannce with the datadog plugin, and replaces the base HTTPX::Session with the patched session class.
- .target_version ⇒ Object
Class Method Details
.patch ⇒ Object
loads a session instannce with the datadog plugin, and replaces the base HTTPX::Session with the patched session class.
306 307 308 309 310 311 |
# File 'lib/httpx/adapters/datadog.rb', line 306 def patch datadog_session = ::HTTPX.plugin(Plugin) ::HTTPX.send(:remove_const, :Session) ::HTTPX.send(:const_set, :Session, datadog_session.class) end |
.target_version ⇒ Object
300 301 302 |
# File 'lib/httpx/adapters/datadog.rb', line 300 def target_version Integration.version end |