Sha256: b8ab91d116ef2e98cbee879afc070518e725bfaab1e16522b505f58ab31966b5

Contents?: true

Size: 921 Bytes

Versions: 8

Compression:

Stored size: 921 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 'grpc/server/chain'
require_relative 'grpc/server/rpc_server_prepend'
require_relative 'grpc/server/rpc_desc_prepend'

DependencyDetection.defer do
  named :grpc_server

  depends_on do
    defined?(GRPC) && defined?(GRPC::RpcServer) && defined?(GRPC::RpcDesc)
  end

  executes do
    supportability_name = 'gRPC_Server'
    if use_prepend?
      prepend_instrument GRPC::RpcServer, NewRelic::Agent::Instrumentation::GRPC::Server::RpcServerPrepend, supportability_name
      prepend_instrument GRPC::RpcDesc, NewRelic::Agent::Instrumentation::GRPC::Server::RpcDescPrepend, supportability_name
    else
      chain_instrument NewRelic::Agent::Instrumentation::GRPC::Server::Chain, supportability_name
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
newrelic_rpm-9.4.2 lib/new_relic/agent/instrumentation/grpc_server.rb
newrelic_rpm-9.4.1 lib/new_relic/agent/instrumentation/grpc_server.rb
newrelic_rpm-9.4.0 lib/new_relic/agent/instrumentation/grpc_server.rb
newrelic_rpm-9.3.1 lib/new_relic/agent/instrumentation/grpc_server.rb
newrelic_rpm-9.3.0 lib/new_relic/agent/instrumentation/grpc_server.rb
newrelic_rpm-9.2.2 lib/new_relic/agent/instrumentation/grpc_server.rb
newrelic_rpm-9.2.1 lib/new_relic/agent/instrumentation/grpc_server.rb
newrelic_rpm-9.2.0 lib/new_relic/agent/instrumentation/grpc_server.rb