Created
August 2, 2017 21:50
-
-
Save kenichi/0f881b9cee4e3e01b573285f470865e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'newrelic_rpm' | |
class Err | |
def self.do | |
raise 'here is an error' | |
end | |
end | |
desc 'test notice error' | |
task :error do | |
NewRelic::Agent.manual_start | |
timeout = NewRelic::Agent.config[:'rake.connect_timeout'] | |
NewRelic::Agent.instance.wait_on_connect(timeout) | |
begin | |
Err.do | |
rescue => e | |
NewRelic::Agent.notice_error e | |
raise | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment