lib/ddtrace/contrib/action_pack/integration.rb in ddtrace-0.44.0 vs lib/ddtrace/contrib/action_pack/integration.rb in ddtrace-0.45.0
- old
+ new
@@ -1,8 +1,9 @@
require 'ddtrace/contrib/integration'
require 'ddtrace/contrib/action_pack/configuration/settings'
require 'ddtrace/contrib/action_pack/patcher'
+require 'ddtrace/contrib/rails/utils'
module Datadog
module Contrib
module ActionPack
# Describes the ActionPack integration
@@ -21,9 +22,15 @@
!defined?(::ActionPack).nil?
end
def self.compatible?
super && version >= MINIMUM_VERSION
+ end
+
+ # enabled by rails integration so should only auto instrument
+ # if detected that it is being used without rails
+ def auto_instrument?
+ !Datadog::Contrib::Rails::Utils.railtie_supported?
end
def default_configuration
Configuration::Settings.new
end