Method: NewRelic::Agent::Instrumentation::ControllerInstrumentation::TransactionNamer.path_name

Defined in:
lib/new_relic/agent/instrumentation/controller_instrumentation.rb

.path_name(traced_obj, options = {}) ⇒ Object

[View source]

257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/new_relic/agent/instrumentation/controller_instrumentation.rb', line 257

def self.path_name(traced_obj, options = {})
  return options[:path] if options[:path]

  class_name = class_name(traced_obj, options)
  if options[:name]
    if class_name
      "#{class_name}/#{options[:name]}"
    else
      options[:name]
    end
  elsif traced_obj.respond_to?(:newrelic_metric_path)
    traced_obj.newrelic_metric_path
  else
    class_name
  end
end