module Datadog::Tracing::Contrib::HTTPX::Patcher

  1. lib/httpx/adapters/datadog.rb

Patcher enables patching of ‘httpx’ with datadog components.

Methods

Public Instance

  1. patch
  2. target_version

Included modules

  1. Datadog::Tracing::Contrib::Patcher

Public Instance methods

patch()

loads a session instannce with the datadog plugin, and replaces the base HTTPX::Session with the patched session class.

[show source]
    # File lib/httpx/adapters/datadog.rb
302 def patch
303   datadog_session = ::HTTPX.plugin(Plugin)
304 
305   ::HTTPX.send(:remove_const, :Session)
306   ::HTTPX.send(:const_set, :Session, datadog_session.class)
307 
308   ::HTTPX::Loggable.singleton_class.prepend(LoggablePatch)
309 end
target_version()
[show source]
    # File lib/httpx/adapters/datadog.rb
296 def target_version
297   Integration.version
298 end