Sha256: 6b8b24edab5f59a1bb59ebb7ed2ab61a730c1c7acfcd45a1834582c121189a0f

Contents?: true

Size: 517 Bytes

Versions: 46

Compression:

Stored size: 517 Bytes

Contents

DependencyDetection.defer do
  @name = :unicorn

  depends_on do
    defined?(::Unicorn) && defined?(::Unicorn::HttpServer)
  end
  
  executes do
    NewRelic::Agent.logger.debug 'Installing Unicorn instrumentation'
  end
  
  executes do
    Unicorn::HttpServer.class_eval do
      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

46 entries across 46 versions & 4 rubygems

Version Path
newrelic_rpm-3.4.2.1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.4.2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.4.2.beta1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.4.1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.4.1.beta1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
ghazel-newrelic_rpm-3.4.0.2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.4.0.1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.4.0 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.4.0.beta2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.3.5 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.3.5.beta1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.4.0.beta1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
dolores_rpm-3.3.4.8 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
dolores_rpm-3.3.4.7 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
dolores_rpm-3.3.4.6 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
dolores_rpm-3.3.4.5 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
dolores_rpm-3.3.4.4 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
dolores_rpm-3.3.4.3 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
dolores_rpm-3.3.4.1.fork2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
dolores_rpm-3.3.4.1.fork lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb