Sha256: 87caa151201e433b8b0ce3780e0cb942904b397e5c03e0d6c37b093eb411a3bb

Contents?: true

Size: 470 Bytes

Versions: 3

Compression:

Stored size: 470 Bytes

Contents

module Upperkut
  module Middlewares
    class NewRelic
      include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation

      def call(worker, _items)
        perform_action_with_newrelic_trace(trace_args(worker)) do
          yield
        end
      end

      private

      def trace_args(worker)
        {
          'name'       => 'perform',
          'class_name' => worker.name,
          'category'   => 'task'
        }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
upperkut-0.4.3 lib/upperkut/middlewares/new_relic.rb
upperkut-0.4.2 lib/upperkut/middlewares/new_relic.rb
upperkut-0.4.1 lib/upperkut/middlewares/new_relic.rb