Module: Instana::Instrumentation::ActionViewRenderer

Defined in:
lib/instana/frameworks/instrumentation/action_view.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



4
5
6
7
# File 'lib/instana/frameworks/instrumentation/action_view.rb', line 4

def self.included(klass)
  ::Instana::Util.method_alias(klass, :render_partial)
  ::Instana::Util.method_alias(klass, :render_collection)
end

Instance Method Details

#render_collection_with_instanaObject



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/instana/frameworks/instrumentation/action_view.rb', line 23

def render_collection_with_instana
  kv_payload = { :render => {} }
  kv_payload[:render][:type] = :collection
  kv_payload[:render][:name] = @path.to_s

  ::Instana.tracer.log_entry(:render, kv_payload)
  render_collection_without_instana
rescue Exception => e
  ::Instana.tracer.log_error(e)
  raise
ensure
  ::Instana.tracer.log_exit(:render)
end

#render_partial_with_instanaObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/instana/frameworks/instrumentation/action_view.rb', line 9

def render_partial_with_instana
  kv_payload = { :render => {} }
  kv_payload[:render][:type] = :partial
  kv_payload[:render][:name] = @options[:partial].to_s if @options.is_a?(Hash)

  ::Instana.tracer.log_entry(:render, kv_payload)
  render_partial_without_instana
rescue Exception => e
  ::Instana.tracer.log_error(e)
  raise
ensure
  ::Instana.tracer.log_exit(:render)
end