Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

NoticeError and Email Notifications




I would like to use the noticeError method (if possible) within my code, that then triggers an alert policy condition, which will send out the proper email notifications.

Is it possible to trigger an alert policy condition by using noticeError or is there another means of doing this?



Hi, @kevin.r.hanson: noticeError() just sends information about an error to New Relic. Once New Relic has the data, however, there are multiple ways you can use it to trigger an alert violation:

  • If the transaction experiencing the error is a key transaction, you may create a key transaction alert condition to trigger a violation based on error count or error rate;

  • If the transaction is not a key transaction, or if you want to trigger a violation based on specific errors, you may create a NRQL alert condition, for example:

    SELECT count(*) FROM TransactionError WHERE appName = 'My Application' AND 
    `error.message` = 'Error 1'