Sha256: bb4ad8948093ea2c443eb5065c3ed0cdca67658ae3277f4a9aaca61fa54e5d14

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

#
# Decorate ActionController::Base with request tracing
#
ActionController::Base.class_eval do
  include XRay::DTrace::Tracer
  
  def perform_action_with_tracing
    firing('request', "#{self.class.to_s}##{action_name.to_s}") do
       perform_action_without_tracing
    end
  end

  def render_with_tracing(options = nil, extra_options = {}, &block) 
    firing('render', options.to_s) do
       render_without_tracing options, extra_options
    end
  end

  alias_method_chain :perform_action, :tracing
  alias_method_chain :render, :tracing
          
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xray-1.1 lib/xray/dtrace/rails/action_controller_tracing_extension.rb