Module: Datadog::Tracing::Contrib::Elasticsearch::Patcher
- Includes:
- Patcher
- Defined in:
- lib/datadog/tracing/contrib/elasticsearch/patcher.rb
Overview
Patcher enables patching of ‘elasticsearch’ module.
Defined Under Namespace
Modules: Client
Constant Summary collapse
Class Method Summary collapse
- .patch ⇒ Object
- .target_version ⇒ Object
-
.transport_module ⇒ Object
‘Elasticsearch` namespace renamed to `Elastic` in version 8.0.0 of the transport gem:.
Methods included from Patcher
Class Method Details
.patch ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/datadog/tracing/contrib/elasticsearch/patcher.rb', line 22 def patch require 'uri' require 'json' require_relative 'quantize' transport_module::Client.prepend(Client) end |
.target_version ⇒ Object
18 19 20 |
# File 'lib/datadog/tracing/contrib/elasticsearch/patcher.rb', line 18 def target_version Integration.version end |
.transport_module ⇒ Object
‘Elasticsearch` namespace renamed to `Elastic` in version 8.0.0 of the transport gem:
149 150 151 152 153 154 155 |
# File 'lib/datadog/tracing/contrib/elasticsearch/patcher.rb', line 149 def transport_module if Integration.version >= Gem::Version.new('8.0.0') ::Elastic::Transport else ::Elasticsearch::Transport end end |