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

Can PHP Errors be exported in New Relic?


#1

I had a high count of errors in a pretty short time-span (700+ within 10 minutes) and New Relic is nicely grouping these together.

Next to the presentation in the web-backend is it possible to export all the entries which are grouped together into a simple text-file, so I can grep through it easily on my local box?


#2

Hi @tom.klingenberg

There isn’t a way to do this in APM, but you can export your errors in Insights. If you mouse over your error chart, you should see an “Add to Insights Dashboard” option. Once you do this, you can export the insights data to a CSV file. More information about that can be found linked below:

Hope this helps!


#3

Now that’s a good hint, especially if it would be possible to tell the CSV export to not cut the error message text which contains the backtraces I’m interested in.

My query NRQL:

SELECT * FROM Transaction SINCE 3 DAYS AGO WHERE errorType = ‘Zend_Controller_Exception’

The CSV export works, but the field/column “Error Message” is cut at what it looks like a 255 byte limit.


#4

Hi @tom.klingenberg :slight_smile: That limit is in our Agent spec. The error.message attribute that is sent in the Transaction Event payload with a character length > 255 is truncated at 255 characters.


#5

@abloomer Sounds like an explanation. Is error data accessible in insights as well? There might not be such a limit, that’s why I ask.


#6

Hi, @tom.klingenberg: Unfortunately, the agent truncates the error message before sending it to Insights.


#7

So this is different to Error Analysis in the APM? Couldn’t insights query the same data as APM Error Analysis does?


#8

The primary Error Analytics page is based on Insights data, specifically the TransactionError event:

Error trace data, however, is not stored in Insights. I suspect that may be where you are seeing longer error messages.


#9

It looks like the TransactionError event captures the full error message:

SELECT count(*) FROM TransactionError FACET error.message SINCE 1 week ago