Sha256: 0f5f04c3f3ca82e80831310d84738014d4b82b6865f83d1f4d589556cc7ca8f4
Contents?: true
Size: 1.04 KB
Versions: 24
Compression:
Stored size: 1.04 KB
Contents
module Appsignal class Hooks module SequelExtension # Add query instrumentation def log_yield(sql, args = nil) # We'd like to get full sql queries in the payloads as well. To do # that we need to find out a way to ask Sequel which quoting strategy # is used by the adapter. We can then do something similar to the AR # formatter. ActiveSupport::Notifications.instrument('sql.sequel') do yield end end end class SequelHook < Appsignal::Hooks::Hook register :sequel def dependencies_present? defined?(::Sequel::Database) && Appsignal.config && Appsignal.config[:instrument_sequel] end def install # Register the extension... ::Sequel::Database.register_extension( :appsignal_integration, Appsignal::Hooks::SequelExtension ) # ... and automatically add it to future instances. ::Sequel::Database.extension(:appsignal_integration) end end end end
Version data entries
24 entries across 24 versions & 1 rubygems