Sha256: 59cc32bc09f6e5e3944de323a74939297a87cd0c3a9d47bd189d3f7ec842504d
Contents?: true
Size: 1.39 KB
Versions: 13
Compression:
Stored size: 1.39 KB
Contents
module Instana module Instrumentation module ActionViewRenderer def self.included(klass) ::Instana::Util.method_alias(klass, :render_partial) ::Instana::Util.method_alias(klass, :render_collection) end def render_partial_with_instana(*args) 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(*args) rescue Exception => e ::Instana.tracer.log_error(e) raise ensure ::Instana.tracer.log_exit(:render) end def render_collection_with_instana(*args) 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(*args) rescue Exception => e ::Instana.tracer.log_error(e) raise ensure ::Instana.tracer.log_exit(:render) end end end end if defined?(::ActionView) && ::Instana.config[:action_view][:enabled] && ::ActionPack::VERSION::STRING >= '3.1' ::Instana.logger.debug "Instrumenting ActionView" ::ActionView::PartialRenderer.send(:include, ::Instana::Instrumentation::ActionViewRenderer) end
Version data entries
13 entries across 13 versions & 1 rubygems