Module: OneApm::Agent::Instrumentation::Rails3::ActionView::OneApm
Instance Method Summary collapse
Instance Method Details
#render_type(file_path) ⇒ Object
45 46 47 48 49 50 51 52 |
# 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 = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/one_apm/inst/rails3/action_controller.rb', line 34 def template_metric(identifier, = {}) if [: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 |