Sha256: f0138e18cd5c8bd9324eda5d2f34fbfffc5e9f7c2a18bc2ddcdd891a5e29b8be

Contents?: true

Size: 767 Bytes

Versions: 39

Compression:

Stored size: 767 Bytes

Contents

# encoding: utf-8

LibraryDetection.defer do
  @name = :passenger

  depends_on do
    defined?(::PhusionPassenger)
  end

  executes do
    OneApm::Manager.logger.debug "Installing Passenger event hooks."

    ::PhusionPassenger.on_event(:stopping_worker_process) do
      OneApm::Manager.logger.debug "Passenger stopping this process, shutdown the agent."
      OneApm::Manager.agent.shutdown
    end

    ::PhusionPassenger.on_event(:starting_worker_process) do |forked|
      # We want to reset the stats from the stats engine in case any carried
      # over into the spawned process.  Don't clear them in case any were
      # cached.  We do this even in conservative spawning.
      OneApm::Manager.agent.after_fork(:force_reconnect => true)
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
oneapm_rpm-1.2.9.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.8 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.8.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.7 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.7.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.6 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.6.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.5 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.5.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.4 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.4.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.3 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.3.rc2 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.2 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.2.rc lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.1.rc lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.0 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.1.3 lib/one_apm/inst/dispatcher/passenger.rb