14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb', line 14
def transaction_name(request)
path = request.path || ::NewRelic::Agent::UNKNOWN_METRIC
name = path.gsub(REGEX_MULTIPLE_SLASHES, '\1') name = NewRelic::ROOT if name.empty?
name = "#{request.request_method} #{name}" if request.respond_to?(:request_method)
name
rescue => e
::NewRelic::Agent.logger.debug("#{e.class} : #{e.message} - Error encountered trying to identify Roda transaction name")
::NewRelic::Agent::UNKNOWN_METRIC
end
|