Sha256: d78d7a6455a4638b11c8f1305f0dd189b5e2cffb85a46921858c56d7367dee80

Contents?: true

Size: 471 Bytes

Versions: 18

Compression:

Stored size: 471 Bytes

Contents

DependencyDetection.defer do
  depends_on do
    defined?(::Unicorn) && defined?(::Unicorn::HttpServer)
  end

  executes do
    Unicorn::HttpServer.class_eval do
      NewRelic::Agent.logger.debug "Installing Unicorn worker hook."
      old_worker_loop = instance_method(:worker_loop)
      define_method(:worker_loop) do | worker |
        NewRelic::Agent.after_fork(:force_reconnect => true)
        old_worker_loop.bind(self).call(worker)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
ghazel-newrelic_rpm-3.1.0.1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.1.0 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.1.0.beta5 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.1.0.beta4 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.1.0.djlogging2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.1.0.djlogging lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.1.0.beta3 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.1.0.beta2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.0.1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.1.0.beta1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.0.0 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.0.0.beta2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.0.0.beta1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-2.14.1.logging1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-2.14.1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-2.14.0 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-2.13.6.beta2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-2.13.6.beta1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb