Module: TingYun::Instrumentation::Rails3::ActionView
- Extended by:
- ActionView
- Included in:
- ActionView
- Defined in:
- lib/ting_yun/instrumentation/rails3/action_view.rb
Instance Method Summary collapse
Instance Method Details
#render_type(file_path) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/ting_yun/instrumentation/rails3/action_view.rb', line 23 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
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ting_yun/instrumentation/rails3/action_view.rb', line 12 def template_metric(identifier, = {}) if [:file] "file" elsif identifier.nil? ::TingYun::Agent::UNKNOWN_METRIC elsif identifier.include? '/' # this is a filepath identifier.split('/')[-2..-1].join('/') else identifier end end |