lib/ddtrace/contrib/rack/integration.rb in ddtrace-0.44.0 vs lib/ddtrace/contrib/rack/integration.rb in ddtrace-0.45.0

- old
+ new

@@ -1,8 +1,9 @@ require 'ddtrace/contrib/integration' require 'ddtrace/contrib/rack/configuration/settings' require 'ddtrace/contrib/rack/patcher' +require 'ddtrace/contrib/rails/utils' module Datadog module Contrib module Rack # Description of Rack integration @@ -21,9 +22,15 @@ !defined?(::Rack).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