Sha256: 8ac41a63f9cbd0ea36275b3d837b14e1ddeeb1e385640b5b861a67cb461fc827

Contents?: true

Size: 306 Bytes

Versions: 4

Compression:

Stored size: 306 Bytes

Contents

#
# Decorate ActiveRecord connection with DB tracing
#
ActiveRecord::Base.connection.class.class_eval do
  include XRay::DTrace::Tracer

  def execute_with_tracing(sql, name=nil)
    firing('db', sql) do
       execute_without_tracing sql, name
    end
  end
  
  alias_method_chain :execute, :tracing

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
XRay-1.0 lib/xray/dtrace/rails/active_record_connection_tracing_extension.rb
XRay-1.0.1 lib/xray/dtrace/rails/active_record_connection_tracing_extension.rb
XRay-1.0.3 lib/xray/dtrace/rails/active_record_connection_tracing_extension.rb
xray-1.1 lib/xray/dtrace/rails/active_record_connection_tracing_extension.rb