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.4.2 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.4.1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.4.0 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.7 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.7.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.6 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.6.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.5 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.5.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.4 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.4.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.3 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.3.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.2 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.2.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.1.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.0 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.3.0.rc1 lib/one_apm/inst/dispatcher/passenger.rb
oneapm_rpm-1.2.9 lib/one_apm/inst/dispatcher/passenger.rb