module OneApm::Agent::Instrumentation::Rails3::ActionView::OneApm
Public Instance Methods
render_type(file_path)
click to toggle source
# File lib/one_apm/inst/rails3/action_controller.rb, line 45 def render_type(file_path) file = File.basename(file_path) if file.starts_with?('_') return 'Partial' else return 'Rendering' end end
template_metric(identifier, options = {})
click to toggle source
# File lib/one_apm/inst/rails3/action_controller.rb, line 34 def template_metric(identifier, options = {}) if options[:file] "file" elsif identifier.nil? OneApm::Transaction::OA_UNKNOWN_METRIC elsif identifier.include? '/' # this is a filepath identifier.split('/')[-2..-1].join('/') else identifier end end