module NewRelic::Agent::Instrumentation::GRPC::Helper

Constants

NR_8T_HOST_PATTERN

Public Instance Methods

cleaned_method(method) click to toggle source
# File lib/new_relic/agent/instrumentation/grpc/helper.rb, line 12
def cleaned_method(method)
  method = method.to_s unless method.is_a?(String)
  return method unless method.start_with?('/')

  method[1..-1]
end
host_denylisted?(host) click to toggle source
# File lib/new_relic/agent/instrumentation/grpc/helper.rb, line 19
def host_denylisted?(host)
  return false unless host

  ignore_patterns.any? { |regex| host.match?(regex) }
end
ignore_patterns() click to toggle source
# File lib/new_relic/agent/instrumentation/grpc/helper.rb, line 25
def ignore_patterns
  ([NR_8T_HOST_PATTERN] + NewRelic::Agent.config[:'instrumentation.grpc.host_denylist']).freeze
end