class ScoutApm::ServerIntegrations::Thin
Attributes
Public Class Methods
Source
# File lib/scout_apm/server_integrations/thin.rb, line 6 def initialize(logger) @logger = logger end
Public Instance Methods
Source
# File lib/scout_apm/server_integrations/thin.rb, line 14 def forking?; false; end
Source
# File lib/scout_apm/server_integrations/thin.rb, line 36 def install end
TODO: What does it mean to install on a non-forking env?
Source
# File lib/scout_apm/server_integrations/thin.rb, line 16 def present? found_thin = false # This code block detects when thin is run as: # `thin start` if defined?(::Thin) && defined?(::Thin::Server) # Ensure Thin is actually initialized. It could just be required and not running. ObjectSpace.each_object(::Thin::Server) { |x| found_thin = true } end # This code block detects when thin is run as: # `rails server` if defined?(::Rails::Server) ObjectSpace.each_object(::Rails::Server) { |x| found_thin ||= (x.instance_variable_get(:@_server).to_s == "Rack::Handler::Thin") } end found_thin end