Sha256: 13b826d2a89186ee9bfeaf14ce72f7a2754491fceb1feefdfe28862f6cb1ef51

Contents?: true

Size: 654 Bytes

Versions: 4

Compression:

Stored size: 654 Bytes

Contents

# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

module NewRelic::Agent::Instrumentation
  module OpenSearch::Chain
    def self.instrument!
      ::OpenSearch::Transport::Client.class_eval do
        include NewRelic::Agent::Instrumentation::OpenSearch

        alias_method(:perform_request_without_tracing, :perform_request)

        def perform_request(*args)
          perform_request_with_tracing(*args) do
            perform_request_without_tracing(*args)
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
newrelic_rpm-9.16.0 lib/new_relic/agent/instrumentation/opensearch/chain.rb
newrelic_rpm-9.15.0 lib/new_relic/agent/instrumentation/opensearch/chain.rb
newrelic_rpm-9.14.0 lib/new_relic/agent/instrumentation/opensearch/chain.rb
newrelic_rpm-9.13.0 lib/new_relic/agent/instrumentation/opensearch/chain.rb