Module: NewRelic::Agent::Instrumentation::SequelHelper

Extended by:
SequelHelper
Included in:
SequelHelper
Defined in:
lib/new_relic/agent/instrumentation/sequel_helper.rb

Constant Summary collapse

DEFAULT_PRODUCT_NAME =

Fallback if the product cannot be determined

'Sequel'.freeze
PRODUCT_NAMES =

A Sequel adapter is called an “adapter_scheme” and can be accessed from the database:

DB.adapter_scheme
{
  :ibmdb => 'IBMDB2',
  :firebird => 'Firebird',
  :informix => 'Informix',
  :jdbc => 'JDBC',
  :mysql => 'MySQL',
  :mysql2 => 'MySQL',
  :oracle => 'Oracle',
  :postgres => 'Postgres',
  :sqlite => 'SQLite'
}.freeze

Instance Method Summary collapse

Instance Method Details

#product_name_from_adapter(adapter) ⇒ Object



30
31
32
# File 'lib/new_relic/agent/instrumentation/sequel_helper.rb', line 30

def product_name_from_adapter(adapter)
  PRODUCT_NAMES.fetch(adapter, DEFAULT_PRODUCT_NAME)
end