Sha256: d256e4ce262d18a8992e6196888c8b7f82f82f21e09a536e8cfc0df161aff43c
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 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[: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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
appsignal-0.12.rc.8 | lib/appsignal/hooks/sequel.rb |