Expected Errors for the PHP agent

I was reviewing the documentation for managing errors in APM.

Specifically, marking errors as expected:

Is there a way to do this with PHP?
The page above only refers to agent-specific documentation limited to Java, Ruby, and Node.js

This is mostly to ignore 404s on non-existing URLs caused by crawlers.


Hi @asimdlv

I don’t think it’s possible to mark errors as Expected in the PHP agent, but you can ignore errors:

Ignore Exceptions: https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration#inivar-err-ignore-exceptions

Ignore Errors: https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration#inivar-err-ignore-errors

Hey @RyanVeitch

Thanks for sharing these, but yea, I know errors and exceptions can be ignored.

That’s not really the goal; I just want to ignore specific 404s on URLs crawlers look for (i.e. /wp-admin). These crawlers just create noise and affect our error % needlessly.

New Relic Edit

  • I want this too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.

Hi @asimdlv I don’t believe there’s a straight forward way to do this. I’ll make this a feature idea and pass it along to the product team.

1 Like

Thank you @ebeach, it would be very useful :slight_smile:

As you can imagine, we’re getting tired of seeing these:

1 Like

Yikes! Yeah that’s not great. We’ll try to keep you updated as we learn more on the feature request that Elizabeth filed for you.

1 Like

Any updates on this with the product team? Has it made it to a backlog of sorts, or is it just floating around?


Hi there @asimdlv -

No updates as of yet. I do know that it’s not on the near-term list, and we will work to update you as soon as we hear anything.

1 Like

Just wondering if there any latest update on this topic. I am facing 4xx errors and triggering false alarms. It would be great to ignore them in PHP like other languages.

@vchandran1 Thank you for reaching out about this feature idea. It’s a bit tricky to track but what I can see is that the original Feature Idea was not added to the roadmap for implementation. I would suggest creating a new topic to outline your use case. We can then submit as a new Feature Idea and thus get some fresh eyes on this issue.

Thanks for your reply.

The use case is pretty much what we have in this topic descroption. We are going to try out the options posted by @RyanVeitch here to see if we could work for us.

1 Like

Hey @vchandran1,

Thank you for letting us know. We would love to hear if you are able to utilize @RyanVeitch’s suggestion to reach your goals. Please let us know if there is anything we can assist with!