Sha256: ec528ca972d31df7ceabc72ff337aa009f0222b004a2ae077a1a148afc18b952

Contents?: true

Size: 440 Bytes

Versions: 64

Compression:

Stored size: 440 Bytes

Contents

# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2021

module Instana
  module Activators
    class GrpcServer < Activator
      def can_instrument?
        defined?(::GRPC::RpcDesc) && ::Instana.config[:grpc][:enabled]
      end

      def instrument
        require 'instana/instrumentation/grpc'

        ::GRPC::RpcDesc.prepend(::Instana::Instrumentation::GRPCServerInstrumentation)

        true
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
instana-1.195.1 lib/instana/activators/grpc_server.rb
instana-1.195.0 lib/instana/activators/grpc_server.rb
instana-1.193.6 lib/instana/activators/grpc_server.rb
instana-1.193.5 lib/instana/activators/grpc_server.rb