Skip to content

Instantly share code, notes, and snippets.

@jelder
Created September 19, 2011 15:25
Show Gist options
  • Save jelder/1226747 to your computer and use it in GitHub Desktop.
Save jelder/1226747 to your computer and use it in GitHub Desktop.
Minimal DelayedJob template with errors captured by NewRelic RPM
require 'newrelic_rpm'
class MyJob
include NewRelic::Agent::Instrumentation::ControllerInstrumentation
def perform
begin
[][0][] # Just here to raise NoMethodError
rescue StandardError => e
NewRelic::Agent.notice_error e
raise e
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment