Sha256: a85f2bc719de80e741197b2db73648ce5f7f48daf888b5b96c51f3cdcf434ee7

Contents?: true

Size: 718 Bytes

Versions: 82

Compression:

Stored size: 718 Bytes

Contents

if defined?(::Sequel)
  Appsignal.logger.info("Loading Sequel (#{ Sequel::VERSION }) integration")

  module Appsignal
    module Integrations
      module Sequel
        # Add query instrumentation
        def log_yield(sql, args = nil)
          name    = 'sql.sequel'
          payload = {:sql => sql, :args => args}

          ActiveSupport::Notifications.instrument(name, payload) { yield }
        end
      end # Sequel
    end # Integrations
  end # Appsignal

  # Register the extension...
  Sequel::Database.register_extension(
    :appsignal_integration,
    Appsignal::Integrations::Sequel
  )

  # ... and automatically add it to future instances.
  Sequel::Database.extension(:appsignal_integration)
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
appsignal-0.11.18 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.54 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.53 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.52 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.51 lib/appsignal/integrations/sequel.rb
appsignal-0.11.17 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.50 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.49 lib/appsignal/integrations/sequel.rb
appsignal-0.11.16 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.48 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.47 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.46 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.45 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.44 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.43 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.42 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.41 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.40 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.39 lib/appsignal/integrations/sequel.rb
appsignal-0.12.beta.38 lib/appsignal/integrations/sequel.rb