Sha256: c195197e01acd16766d0ef87f20bb95f599ce8339a2063c21698b2c8e1c28c9e

Contents?: true

Size: 783 Bytes

Versions: 37

Compression:

Stored size: 783 Bytes

Contents

module RorVsWild
  module Plugin
    class Elasticsearch
      def self.setup
        return if !defined?(::Elasticsearch::Transport)
        return if ::Elasticsearch::Transport::Client.method_defined?(:perform_request_without_rorvswild)

        ::Elasticsearch::Transport::Client.class_eval do
          alias_method :perform_request_without_rorvswild, :perform_request

          def perform_request(*args)
            RorVsWild::Plugin::NetHttp.ignore do
              command = {method: args[0], path: args[1], params: args[2], body: args[3]}.to_json
              RorVsWild.agent.measure_section(command, kind: "elasticsearch") do
                perform_request_without_rorvswild(*args)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
rorvswild-1.9.0 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.8.1 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.8.0 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.7.1 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.7.0 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.6.5 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.6.4 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.6.3 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.6.2 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.6.1 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.6.0 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.17 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.16 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.15 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.14 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.13 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.12 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.11 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.10 lib/rorvswild/plugin/elasticsearch.rb
rorvswild-1.5.9 lib/rorvswild/plugin/elasticsearch.rb