Sha256: d3a94ce8f7f92b37e155de1584f1fa8c4c111a35f894352694a566aa10aab6a6
Contents?: true
Size: 853 Bytes
Versions: 49
Compression:
Stored size: 853 Bytes
Contents
module Appsignal class Hooks module SequelExtension # Add query instrumentation def log_yield(sql, args = nil) ActiveSupport::Notifications.instrument( 'sql.sequel', :sql => sql ) 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
49 entries across 49 versions & 1 rubygems