Sha256: 531cec8cab50dcb14dcb375051363e7dd13f4fd4e94b9c7f4073e767ef94db6f

Contents?: true

Size: 714 Bytes

Versions: 4

Compression:

Stored size: 714 Bytes

Contents

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

require_relative 'grpc/client/chain'
require_relative 'grpc/client/prepend'

DependencyDetection.defer do
  named :grpc_client

  depends_on do
    defined?(::GRPC) && defined?(::GRPC::ClientStub)
  end

  executes do
    supportability_name = 'gRPC_Client'
    if use_prepend?
      prepend_instrument ::GRPC::ClientStub, ::NewRelic::Agent::Instrumentation::GRPC::Client::Prepend, supportability_name
    else
      chain_instrument ::NewRelic::Agent::Instrumentation::GRPC::Client::Chain, supportability_name
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
newrelic_rpm-8.13.1 lib/new_relic/agent/instrumentation/grpc_client.rb
newrelic_rpm-8.13.0 lib/new_relic/agent/instrumentation/grpc_client.rb
newrelic_rpm-8.12.0 lib/new_relic/agent/instrumentation/grpc_client.rb
newrelic_rpm-8.11.0 lib/new_relic/agent/instrumentation/grpc_client.rb