Sha256: 87fe308007b4991b173f4ec83d36e6da814414c3e435427ba5c5c24498768d14

Contents?: true

Size: 686 Bytes

Versions: 19

Compression:

Stored size: 686 Bytes

Contents

DependencyDetection.defer do
  @name = :unicorn

  depends_on do
    defined?(::Unicorn) && defined?(::Unicorn::HttpServer)
  end

  executes do
    ::NewRelic::Agent.logger.info 'Installing Unicorn instrumentation'
    ::NewRelic::Agent.logger.info 'Detected Unicorn, please see additional documentation: https://newrelic.com/docs/troubleshooting/im-using-unicorn-and-i-dont-see-any-data'
  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

19 entries across 19 versions & 3 rubygems

Version Path
wd_newrelic_rpm-3.5.8 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
sundawg_newrelic_rpm-3.5.8.2 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
sundawg_newrelic_rpm-3.5.8.1 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.8.72 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.8.70 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.8.64.beta lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.7.59 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.7.59.beta lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.7.58.beta lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
wd_newrelic_rpm-3.5.6 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.7.57.beta lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.6.55 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.6.48.beta lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.6.46.beta lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.6.42.beta lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.5.39.beta lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
wd_newrelic_rpm-3.5.5 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.5.38 lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
newrelic_rpm-3.5.5.540.dev lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb