Class: Woodhouse::NewRelic::InstrumentationMiddleware

Inherits:
Middleware
  • Object
show all
Includes:
NewRelic::Agent::Instrumentation::ControllerInstrumentation
Defined in:
lib/woodhouse/extensions/new_relic/instrumentation_middleware.rb

Instance Method Summary collapse

Methods inherited from Middleware

#initialize

Constructor Details

This class inherits a constructor from Woodhouse::Middleware

Instance Method Details

#call(job, worker) ⇒ Object



4
5
6
7
8
# File 'lib/woodhouse/extensions/new_relic/instrumentation_middleware.rb', line 4

def call(job, worker)
  perform_action_with_newrelic_trace(:name => job.job_method, :class_name => job.worker_class_name, :params => job.arguments, :category => :task, :path => job.queue_name) do
    yield job, worker
  end
end