module NewRelic::Agent::Instrumentation::RackHelpers
Public Class Methods
middleware_instrumentation_enabled?()
click to toggle source
# File lib/new_relic/agent/instrumentation/rack/helpers.rb, line 29 def self.middleware_instrumentation_enabled? version_supported? && !::NewRelic::Agent.config[:disable_middleware_instrumentation] end
puma_rack_version_supported?()
click to toggle source
# File lib/new_relic/agent/instrumentation/rack/helpers.rb, line 19 def self.puma_rack_version_supported? return false unless defined? ::Puma::Const::PUMA_VERSION version = Gem::Version.new(::Puma::Const::PUMA_VERSION) # TODO: MAJOR VERSION - update min_version to 3.9.0 # min_version = Gem::Version.new('3.9.0') min_version = Gem::Version.new('2.12.0') version >= min_version end
rack_version_supported?()
click to toggle source
# File lib/new_relic/agent/instrumentation/rack/helpers.rb, line 11 def self.rack_version_supported? return false unless defined? ::Rack version = Gem::Version.new(::Rack.release) min_version = Gem::Version.new('1.1.0') version >= min_version end
version_supported?()
click to toggle source
# File lib/new_relic/agent/instrumentation/rack/helpers.rb, line 7 def self.version_supported? rack_version_supported? || puma_rack_version_supported? end