module NewRelic::Agent::Instrumentation::Webmachine::FSM

Public Instance Methods

run_with_newrelic() click to toggle source
# File lib/new_relic/webmachine/instrument.rb, line 13
def run_with_newrelic
  trace_params = {
    :category => :controller,
    :class_name => resource.class.name,
    :name => request.method,
    :request => NewRelicRequest.new(request),
    :params => request.query.merge(request.path_info || {})
  }
  perform_action_with_newrelic_trace(trace_params) do
    run_without_newrelic
  end
end

Private Instance Methods

handle_exceptions_with_newrelic() { || ... } click to toggle source
# File lib/new_relic/webmachine/instrument.rb, line 28
def handle_exceptions_with_newrelic
  handle_exceptions_without_newrelic do
    begin
      yield
    rescue Exception => e
      ::NewRelic::Agent.notice_error(e)
      raise e
    end
  end
end