3

My team uses New Relic in our AWS Lambda functions in order to monitor lambdas activity. I guess that by default, in case an error is thrown in one of the lambda function and it is not catched and handled, the New Relic agent will send that error. I'm guessing this because we did not configure this behavior explicitly. How can we configure the Node.js New Relic agent to not send any message for errors with a particular name?

For example, in case an error with this message would be thrown in the lambda function, I would like the New Relic agent to ignore this error:

[ErrorName] [#1] Some message

From what I read up to this point, we could use the newrelic.js file to configure the agent or the NEW_RELIC_IGNORING_RULES environment variable but I find the documentation quite poor in examples, that's why I'm asking if has anyone had to configure a similar behavior?

We would have to stop the agent to send data when the error message is like this one [ErrorName] [#1] Some message but let the agent send data for errors with the message like this one[ErrorName] [#2] Some message, (the difference between the two error messages being the 1 or 2 digit) so some regex is probably needed but again, quite poor documentation on it.

CCBet
  • 416
  • 1
  • 6
  • 19

0 Answers0