Sha256: 383a1fef406d928cc74fee2b3f36c10be9b5754e7ff7769d99511fb8a4f6a5cb

Contents?: true

Size: 729 Bytes

Versions: 2

Compression:

Stored size: 729 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

require_relative 'opensearch/instrumentation'
require_relative 'opensearch/chain'
require_relative 'opensearch/prepend'

DependencyDetection.defer do
  named :opensearch

  depends_on do
    defined?(OpenSearch)
  end

  executes do
    NewRelic::Agent.logger.info('Installing opensearch-ruby instrumentation')

    if use_prepend?
      prepend_instrument OpenSearch::Transport::Client, NewRelic::Agent::Instrumentation::OpenSearch::Prepend
    else
      chain_instrument NewRelic::Agent::Instrumentation::OpenSearch::Chain
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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