Sha256: 89ede434bf5d779134c5cb51d5e96b07f30aa10b5cdb3a39e0fb79367d7f7291

Contents?: true

Size: 1013 Bytes

Versions: 26

Compression:

Stored size: 1013 Bytes

Contents

# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

module NewRelic
  module Agent
    module Instrumentation
      module SequelHelper
        extend self

        # Fallback if the product cannot be determined
        DEFAULT_PRODUCT_NAME = 'Sequel'.freeze

        # A Sequel adapter is called an "adapter_scheme" and can be accessed from
        # the database:
        #
        #   DB.adapter_scheme
        PRODUCT_NAMES = {
          :ibmdb => 'IBMDB2',
          :firebird => 'Firebird',
          :informix => 'Informix',
          :jdbc => 'JDBC',
          :mysql => 'MySQL',
          :mysql2 => 'MySQL',
          :oracle => 'Oracle',
          :postgres => 'Postgres',
          :sqlite => 'SQLite'
        }.freeze

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
newrelic_rpm-9.17.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.16.1 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.16.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.15.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.14.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.13.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.12.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.11.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.10.2 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.10.1 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.10.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.9.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.8.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.7.1 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.7.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.6.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.5.0 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.4.2 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.4.1 lib/new_relic/agent/instrumentation/sequel_helper.rb
newrelic_rpm-9.4.0 lib/new_relic/agent/instrumentation/sequel_helper.rb